diff options
| author | Oli Scherer <github35764891676564198441@oli-obk.de> | 2021-03-12 12:59:37 +0000 |
|---|---|---|
| committer | Oli Scherer <github35764891676564198441@oli-obk.de> | 2021-03-12 12:59:37 +0000 |
| commit | 6ca1d871948cc8fb9831f7f4d2e898bbef557e93 (patch) | |
| tree | 37a1c30c5e70d750e0c49fc5ef4474570ad29308 | |
| parent | 20f737966ec350e3cdc3b4193f2d000ad321d10e (diff) | |
| download | rust-6ca1d871948cc8fb9831f7f4d2e898bbef557e93.tar.gz rust-6ca1d871948cc8fb9831f7f4d2e898bbef557e93.zip | |
Visit `mir::Constant::user_ty` for completeness.
It's not necessary yet, but it may become necessary with things like lazy normalization.
| -rw-r--r-- | compiler/rustc_middle/src/mir/type_foldable.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_middle/src/mir/type_foldable.rs b/compiler/rustc_middle/src/mir/type_foldable.rs index 4ad69a2cb98..44bedd75553 100644 --- a/compiler/rustc_middle/src/mir/type_foldable.rs +++ b/compiler/rustc_middle/src/mir/type_foldable.rs @@ -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) } } |
