Skip to content

Commit 465d198

Browse files
committed
Rename TypeVisitor::visit_unevaluated_const.
To match the corresponding type name.
1 parent 7fe2c4b commit 465d198

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

compiler/rustc_middle/src/ty/fold.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ pub trait TypeVisitor<'tcx>: Sized {
385385
c.super_visit_with(self)
386386
}
387387

388-
fn visit_unevaluated_const(&mut self, uv: ty::Unevaluated<'tcx>) -> ControlFlow<Self::BreakTy> {
388+
fn visit_unevaluated(&mut self, uv: ty::Unevaluated<'tcx>) -> ControlFlow<Self::BreakTy> {
389389
uv.super_visit_with(self)
390390
}
391391

@@ -1280,7 +1280,7 @@ impl<'tcx> TypeVisitor<'tcx> for HasTypeFlagsVisitor {
12801280

12811281
#[inline]
12821282
#[instrument(level = "trace")]
1283-
fn visit_unevaluated_const(&mut self, uv: ty::Unevaluated<'tcx>) -> ControlFlow<Self::BreakTy> {
1283+
fn visit_unevaluated(&mut self, uv: ty::Unevaluated<'tcx>) -> ControlFlow<Self::BreakTy> {
12841284
let flags = FlagComputation::for_unevaluated_const(uv);
12851285
trace!(r.flags=?flags);
12861286
if flags.intersects(self.flags) {

compiler/rustc_middle/src/ty/structural_impls.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,7 @@ impl<'tcx> TypeFoldable<'tcx> for ty::Unevaluated<'tcx> {
12481248
}
12491249

12501250
fn visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<V::BreakTy> {
1251-
visitor.visit_unevaluated_const(*self)
1251+
visitor.visit_unevaluated(*self)
12521252
}
12531253

12541254
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<V::BreakTy> {
@@ -1269,7 +1269,7 @@ impl<'tcx> TypeFoldable<'tcx> for ty::Unevaluated<'tcx, ()> {
12691269
}
12701270

12711271
fn visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<V::BreakTy> {
1272-
visitor.visit_unevaluated_const(self.expand())
1272+
visitor.visit_unevaluated(self.expand())
12731273
}
12741274

12751275
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<V::BreakTy> {

compiler/rustc_trait_selection/src/traits/object_safety.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -814,10 +814,7 @@ fn contains_illegal_self_type_reference<'tcx, T: TypeFoldable<'tcx>>(
814814
}
815815
}
816816

817-
fn visit_unevaluated_const(
818-
&mut self,
819-
uv: ty::Unevaluated<'tcx>,
820-
) -> ControlFlow<Self::BreakTy> {
817+
fn visit_unevaluated(&mut self, uv: ty::Unevaluated<'tcx>) -> ControlFlow<Self::BreakTy> {
821818
// Constants can only influence object safety if they reference `Self`.
822819
// This is only possible for unevaluated constants, so we walk these here.
823820
//

0 commit comments

Comments
 (0)