diff options
| -rw-r--r-- | compiler/rustc_borrowck/src/type_check/relate_tys.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_infer/src/infer/relate/nll.rs | 18 |
2 files changed, 13 insertions, 13 deletions
diff --git a/compiler/rustc_borrowck/src/type_check/relate_tys.rs b/compiler/rustc_borrowck/src/type_check/relate_tys.rs index 2dcfef66257..34cec4caea1 100644 --- a/compiler/rustc_borrowck/src/type_check/relate_tys.rs +++ b/compiler/rustc_borrowck/src/type_check/relate_tys.rs @@ -1,5 +1,5 @@ use rustc_errors::ErrorGuaranteed; -use rustc_infer::infer::nll_relate::{TypeRelating, TypeRelatingDelegate}; +use rustc_infer::infer::nll_relate::{NllTypeRelating, NllTypeRelatingDelegate}; use rustc_infer::infer::NllRegionVariableOrigin; use rustc_infer::traits::PredicateObligations; use rustc_middle::mir::ConstraintCategory; @@ -32,7 +32,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> { locations: Locations, category: ConstraintCategory<'tcx>, ) -> Result<(), NoSolution> { - TypeRelating::new( + NllTypeRelating::new( self.infcx, NllTypeRelatingDelegate::new(self, locations, category, UniverseInfo::relate(a, b)), v, @@ -49,7 +49,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> { locations: Locations, category: ConstraintCategory<'tcx>, ) -> Result<(), NoSolution> { - TypeRelating::new( + NllTypeRelating::new( self.infcx, NllTypeRelatingDelegate::new(self, locations, category, UniverseInfo::other()), ty::Variance::Invariant, @@ -84,7 +84,7 @@ impl<'me, 'bccx, 'tcx> NllTypeRelatingDelegate<'me, 'bccx, 'tcx> { } } -impl<'tcx> TypeRelatingDelegate<'tcx> for NllTypeRelatingDelegate<'_, '_, 'tcx> { +impl<'tcx> NllTypeRelatingDelegate<'tcx> for NllTypeRelatingDelegate<'_, '_, 'tcx> { fn span(&self) -> Span { self.locations.span(self.type_checker.body) } diff --git a/compiler/rustc_infer/src/infer/relate/nll.rs b/compiler/rustc_infer/src/infer/relate/nll.rs index 069a7eeddc5..a34c3313b1a 100644 --- a/compiler/rustc_infer/src/infer/relate/nll.rs +++ b/compiler/rustc_infer/src/infer/relate/nll.rs @@ -34,9 +34,9 @@ use crate::infer::InferCtxt; use crate::infer::{TypeVariableOrigin, TypeVariableOriginKind}; use crate::traits::{Obligation, PredicateObligations}; -pub struct TypeRelating<'me, 'tcx, D> +pub struct NllTypeRelating<'me, 'tcx, D> where - D: TypeRelatingDelegate<'tcx>, + D: NllTypeRelatingDelegate<'tcx>, { infcx: &'me InferCtxt<'tcx>, @@ -54,7 +54,7 @@ where ambient_variance_info: ty::VarianceDiagInfo<'tcx>, } -pub trait TypeRelatingDelegate<'tcx> { +pub trait NllTypeRelatingDelegate<'tcx> { fn param_env(&self) -> ty::ParamEnv<'tcx>; fn span(&self) -> Span; @@ -98,9 +98,9 @@ pub trait TypeRelatingDelegate<'tcx> { fn next_placeholder_region(&mut self, placeholder: ty::PlaceholderRegion) -> ty::Region<'tcx>; } -impl<'me, 'tcx, D> TypeRelating<'me, 'tcx, D> +impl<'me, 'tcx, D> NllTypeRelating<'me, 'tcx, D> where - D: TypeRelatingDelegate<'tcx>, + D: NllTypeRelatingDelegate<'tcx>, { pub fn new(infcx: &'me InferCtxt<'tcx>, delegate: D, ambient_variance: ty::Variance) -> Self { Self { @@ -273,9 +273,9 @@ where } } -impl<'tcx, D> TypeRelation<'tcx> for TypeRelating<'_, 'tcx, D> +impl<'tcx, D> TypeRelation<'tcx> for NllTypeRelating<'_, 'tcx, D> where - D: TypeRelatingDelegate<'tcx>, + D: NllTypeRelatingDelegate<'tcx>, { fn tcx(&self) -> TyCtxt<'tcx> { self.infcx.tcx @@ -514,9 +514,9 @@ where } } -impl<'tcx, D> ObligationEmittingRelation<'tcx> for TypeRelating<'_, 'tcx, D> +impl<'tcx, D> ObligationEmittingRelation<'tcx> for NllTypeRelating<'_, 'tcx, D> where - D: TypeRelatingDelegate<'tcx>, + D: NllTypeRelatingDelegate<'tcx>, { fn span(&self) -> Span { self.delegate.span() |
