Visit mir::Constant::user_ty for completeness.

It's not necessary yet, but it may become necessary with things like lazy normalization.
This commit is contained in:
Oli Scherer 2021-03-12 12:59:37 +00:00
parent 20f737966e
commit 6ca1d87194

View File

@ -342,8 +342,8 @@ impl<'tcx> TypeFoldable<'tcx> for Constant<'tcx> {
}
}
fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<V::BreakTy> {
self.literal.visit_with(visitor)
// FIXME: should this be visiting the `user_ty`, too?
self.literal.visit_with(visitor)?;
self.user_ty.visit_with(visitor)
}
}