Skip to content

Commit

Permalink
Auto merge of rust-lang#127500 - compiler-errors:consolidate-region-e…
Browse files Browse the repository at this point in the history
…rrors, 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
  • Loading branch information
bors committed Jul 9, 2024
2 parents a2d5819 + 9a92526 commit f25e92b
Show file tree
Hide file tree
Showing 4 changed files with 1,273 additions and 1,270 deletions.
12 changes: 5 additions & 7 deletions compiler/rustc_borrowck/src/diagnostics/region_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@ use rustc_hir::GenericBound::Trait;
use rustc_hir::QPath::Resolved;
use rustc_hir::WherePredicate::BoundPredicate;
use rustc_hir::{PolyTraitRef, TyKind, WhereBoundPredicate};
use rustc_infer::infer::{
error_reporting::nice_region_error::{
self, find_anon_type, find_param_with_region, suggest_adding_lifetime_params,
HirTraitObjectVisitor, NiceRegionError, TraitObjectVisitor,
},
error_reporting::unexpected_hidden_region_diagnostic,
NllRegionVariableOrigin, RelateParamBound,
use rustc_infer::infer::error_reporting::nice_region_error::{
self, find_anon_type, find_param_with_region, suggest_adding_lifetime_params,
HirTraitObjectVisitor, NiceRegionError, TraitObjectVisitor,
};
use rustc_infer::infer::error_reporting::region::unexpected_hidden_region_diagnostic;
use rustc_infer::infer::{NllRegionVariableOrigin, RelateParamBound};
use rustc_middle::bug;
use rustc_middle::hir::place::PlaceBase;
use rustc_middle::mir::{ConstraintCategory, ReturnConstraint};
Expand Down
Loading

0 comments on commit f25e92b

Please sign in to comment.