Skip to content

Commit f25e92b

Browse files
committed
Auto merge of rust-lang#127500 - compiler-errors:consolidate-region-errors, r=lcnr
Consolidate region error reporting in `rustc_infer` More work on rust-lang#127492. Separate but important step, since I'm gonna likely pull everything else here into another module. I don't think I'm confident whether `nice_region_error` should be a submodule of the new `rustc_infer::infer::error_reporting::region` module, so I left it alone for now. r? lcnr
2 parents a2d5819 + 9a92526 commit f25e92b

File tree

4 files changed

+1273
-1270
lines changed

4 files changed

+1273
-1270
lines changed

compiler/rustc_borrowck/src/diagnostics/region_errors.rs

+5-7
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,12 @@ use rustc_hir::GenericBound::Trait;
1010
use rustc_hir::QPath::Resolved;
1111
use rustc_hir::WherePredicate::BoundPredicate;
1212
use rustc_hir::{PolyTraitRef, TyKind, WhereBoundPredicate};
13-
use rustc_infer::infer::{
14-
error_reporting::nice_region_error::{
15-
self, find_anon_type, find_param_with_region, suggest_adding_lifetime_params,
16-
HirTraitObjectVisitor, NiceRegionError, TraitObjectVisitor,
17-
},
18-
error_reporting::unexpected_hidden_region_diagnostic,
19-
NllRegionVariableOrigin, RelateParamBound,
13+
use rustc_infer::infer::error_reporting::nice_region_error::{
14+
self, find_anon_type, find_param_with_region, suggest_adding_lifetime_params,
15+
HirTraitObjectVisitor, NiceRegionError, TraitObjectVisitor,
2016
};
17+
use rustc_infer::infer::error_reporting::region::unexpected_hidden_region_diagnostic;
18+
use rustc_infer::infer::{NllRegionVariableOrigin, RelateParamBound};
2119
use rustc_middle::bug;
2220
use rustc_middle::hir::place::PlaceBase;
2321
use rustc_middle::mir::{ConstraintCategory, ReturnConstraint};

0 commit comments

Comments
 (0)