Skip to content

Commit 6ca1d87

Browse files
committed
Visit mir::Constant::user_ty for completeness.
It's not necessary yet, but it may become necessary with things like lazy normalization.
1 parent 20f7379 commit 6ca1d87

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_middle/src/mir/type_foldable.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,8 @@ impl<'tcx> TypeFoldable<'tcx> for Constant<'tcx> {
342342
}
343343
}
344344
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<V::BreakTy> {
345-
self.literal.visit_with(visitor)
346-
// FIXME: should this be visiting the `user_ty`, too?
345+
self.literal.visit_with(visitor)?;
346+
self.user_ty.visit_with(visitor)
347347
}
348348
}
349349

0 commit comments

Comments
 (0)