Skip to content

Commit b99f59b

Browse files
committed
Rename structurally_normalize to structurally_normalize_ty
1 parent 513bfaa commit b99f59b

8 files changed

Lines changed: 13 additions & 13 deletions

File tree

‎compiler/rustc_borrowck/src/type_check/canonical.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
185185
CustomTypeOp::new(
186186
|ocx| {
187187
let structurally_normalize = |ty| {
188-
ocx.structurally_normalize(
188+
ocx.structurally_normalize_ty(
189189
&ObligationCause::misc(
190190
location.to_locations().span(body),
191191
body.source.def_id().expect_local(),
@@ -230,7 +230,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
230230
ConstraintCategory::Boring,
231231
CustomTypeOp::new(
232232
|ocx| {
233-
ocx.structurally_normalize(
233+
ocx.structurally_normalize_ty(
234234
&ObligationCause::misc(
235235
location.to_locations().span(body),
236236
body.source.def_id().expect_local(),

‎compiler/rustc_hir_analysis/src/autoderef.rs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ impl<'a, 'tcx> Iterator for Autoderef<'a, 'tcx> {
8686
ifself.infcx.next_trait_solver()
8787
&& let ty::Alias(..) = ty.kind()
8888
{
89-
let(normalized_ty, obligations) = self.structurally_normalize(ty)?;
89+
let(normalized_ty, obligations) = self.structurally_normalize_ty(ty)?;
9090
self.state.obligations.extend(obligations);
9191
(AutoderefKind::Builtin, normalized_ty)
9292
}else{
@@ -166,20 +166,20 @@ impl<'a, 'tcx> Autoderef<'a, 'tcx> {
166166
}
167167

168168
let(normalized_ty, obligations) =
169-
self.structurally_normalize(Ty::new_projection(tcx, trait_target_def_id,[ty]))?;
169+
self.structurally_normalize_ty(Ty::new_projection(tcx, trait_target_def_id,[ty]))?;
170170
debug!("overloaded_deref_ty({:?}) = ({:?}, {:?})", ty, normalized_ty, obligations);
171171
self.state.obligations.extend(obligations);
172172

173173
Some(self.infcx.resolve_vars_if_possible(normalized_ty))
174174
}
175175

176176
#[instrument(level = "debug", skip(self), ret)]
177-
pubfnstructurally_normalize(
177+
pubfnstructurally_normalize_ty(
178178
&self,
179179
ty:Ty<'tcx>,
180180
) -> Option<(Ty<'tcx>,PredicateObligations<'tcx>)>{
181181
let ocx = ObligationCtxt::new(self.infcx);
182-
letOk(normalized_ty) = ocx.structurally_normalize(
182+
letOk(normalized_ty) = ocx.structurally_normalize_ty(
183183
&traits::ObligationCause::misc(self.span,self.body_id),
184184
self.param_env,
185185
ty,

‎compiler/rustc_hir_analysis/src/coherence/orphan.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ fn orphan_check<'tcx>(
320320
}
321321

322322
let ty = if infcx.next_trait_solver(){
323-
ocx.structurally_normalize(
323+
ocx.structurally_normalize_ty(
324324
&cause,
325325
ty::ParamEnv::empty(),
326326
infcx.resolve_vars_if_possible(ty),

‎compiler/rustc_hir_typeck/src/coercion.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
11241124
ifself.next_trait_solver()
11251125
&& let ty::Alias(..) = ty.kind()
11261126
{
1127-
ocx.structurally_normalize(&cause,self.param_env, ty)
1127+
ocx.structurally_normalize_ty(&cause,self.param_env, ty)
11281128
}else{
11291129
Ok(ty)
11301130
}

‎compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1433,7 +1433,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
14331433
// in a reentrant borrow, causing an ICE.
14341434
let result = self
14351435
.at(&self.misc(sp),self.param_env)
1436-
.structurally_normalize(ty,&mut**self.fulfillment_cx.borrow_mut());
1436+
.structurally_normalize_ty(ty,&mut**self.fulfillment_cx.borrow_mut());
14371437
match result {
14381438
Ok(normalized_ty) => normalized_ty,
14391439
Err(errors) => {

‎compiler/rustc_trait_selection/src/traits/coherence.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ impl<'a, 'tcx> ProofTreeVisitor<'tcx> for AmbiguityCausesVisitor<'a, 'tcx> {
709709
ifmatches!(ty.kind(), ty::Alias(..)){
710710
let ocx = ObligationCtxt::new(infcx);
711711
ty = ocx
712-
.structurally_normalize(&ObligationCause::dummy(), param_env, ty)
712+
.structurally_normalize_ty(&ObligationCause::dummy(), param_env, ty)
713713
.map_err(|_| ())?;
714714
if !ocx.select_where_possible().is_empty(){
715715
returnErr(());

‎compiler/rustc_trait_selection/src/traits/engine.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,15 +319,15 @@ where
319319
self.infcx.at(cause, param_env).deeply_normalize(value,&mut**self.engine.borrow_mut())
320320
}
321321

322-
pubfnstructurally_normalize(
322+
pubfnstructurally_normalize_ty(
323323
&self,
324324
cause:&ObligationCause<'tcx>,
325325
param_env: ty::ParamEnv<'tcx>,
326326
value:Ty<'tcx>,
327327
) -> Result<Ty<'tcx>,Vec<E>>{
328328
self.infcx
329329
.at(cause, param_env)
330-
.structurally_normalize(value,&mut**self.engine.borrow_mut())
330+
.structurally_normalize_ty(value,&mut**self.engine.borrow_mut())
331331
}
332332

333333
pubfnstructurally_normalize_const(

‎compiler/rustc_trait_selection/src/traits/structural_normalize.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use crate::traits::{NormalizeExt, Obligation};
77

88
#[extension(pubtraitStructurallyNormalizeExt<'tcx>)]
99
impl<'tcx>At<'_,'tcx>{
10-
fnstructurally_normalize<E:'tcx>(
10+
fnstructurally_normalize_ty<E:'tcx>(
1111
&self,
1212
ty:Ty<'tcx>,
1313
fulfill_cx:&mutdynTraitEngine<'tcx,E>,

0 commit comments

Comments
 (0)