diff options
| author | Michael Goulet <michael@errs.io> | 2025-02-05 18:32:06 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-02-05 18:32:06 +0000 |
| commit | 4e763c22976cf00e28d94c0f5af455c21327d1b8 (patch) | |
| tree | ee343b32f7cb4ec6d02f6ce7e847e03c6f2788e3 /compiler/rustc_infer/src/infer/context.rs | |
| parent | fd1110ce6a417cff24a9d3695333e05b7caf9c29 (diff) | |
| download | rust-4e763c22976cf00e28d94c0f5af455c21327d1b8.tar.gz rust-4e763c22976cf00e28d94c0f5af455c21327d1b8.zip | |
Pass spans around new solver
Diffstat (limited to 'compiler/rustc_infer/src/infer/context.rs')
| -rw-r--r-- | compiler/rustc_infer/src/infer/context.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler/rustc_infer/src/infer/context.rs b/compiler/rustc_infer/src/infer/context.rs index 69ab0e69e21..eae69ec3e0f 100644 --- a/compiler/rustc_infer/src/infer/context.rs +++ b/compiler/rustc_infer/src/infer/context.rs @@ -5,7 +5,7 @@ use rustc_middle::ty::fold::TypeFoldable; use rustc_middle::ty::relate::RelateResult; use rustc_middle::ty::relate::combine::PredicateEmittingRelation; use rustc_middle::ty::{self, Ty, TyCtxt}; -use rustc_span::{DUMMY_SP, ErrorGuaranteed}; +use rustc_span::{DUMMY_SP, ErrorGuaranteed, Span}; use super::{BoundRegionConversionTime, InferCtxt, RegionVariableOrigin, SubregionOrigin}; @@ -203,23 +203,23 @@ impl<'tcx> rustc_type_ir::InferCtxtLike for InferCtxt<'tcx> { self.probe(|_| probe()) } - fn sub_regions(&self, sub: ty::Region<'tcx>, sup: ty::Region<'tcx>) { + fn sub_regions(&self, sub: ty::Region<'tcx>, sup: ty::Region<'tcx>, span: Span) { self.inner.borrow_mut().unwrap_region_constraints().make_subregion( - SubregionOrigin::RelateRegionParamBound(DUMMY_SP, None), + SubregionOrigin::RelateRegionParamBound(span, None), sub, sup, ); } - fn equate_regions(&self, a: ty::Region<'tcx>, b: ty::Region<'tcx>) { + fn equate_regions(&self, a: ty::Region<'tcx>, b: ty::Region<'tcx>, span: Span) { self.inner.borrow_mut().unwrap_region_constraints().make_eqregion( - SubregionOrigin::RelateRegionParamBound(DUMMY_SP, None), + SubregionOrigin::RelateRegionParamBound(span, None), a, b, ); } - fn register_ty_outlives(&self, ty: Ty<'tcx>, r: ty::Region<'tcx>) { - self.register_region_obligation_with_cause(ty, r, &ObligationCause::dummy()); + fn register_ty_outlives(&self, ty: Ty<'tcx>, r: ty::Region<'tcx>, span: Span) { + self.register_region_obligation_with_cause(ty, r, &ObligationCause::dummy_with_span(span)); } } |
