about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorAaron Hill <aa1ronham@gmail.com>2021-11-24 17:20:52 -0600
committerAaron Hill <aa1ronham@gmail.com>2021-11-25 15:33:37 -0600
commita7cc6bc4d0eba9e9c59cd74faa03955f35fbde35 (patch)
treedaa87ed35555a4c8858b0e036917623cb034472f /compiler
parent982c552c908d179eaa38b6ef152ad3fa30268778 (diff)
downloadrust-a7cc6bc4d0eba9e9c59cd74faa03955f35fbde35.tar.gz
rust-a7cc6bc4d0eba9e9c59cd74faa03955f35fbde35.zip
Visit `param_env` field in Obligation's `TypeFoldable` impl
This oversight appears to have gone unnoticed for a long time
without causing issues, but it should still be fixed.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_infer/src/traits/structural_impls.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_infer/src/traits/structural_impls.rs b/compiler/rustc_infer/src/traits/structural_impls.rs
index c4a2ecee096..b48ca3bd0c0 100644
--- a/compiler/rustc_infer/src/traits/structural_impls.rs
+++ b/compiler/rustc_infer/src/traits/structural_impls.rs
@@ -70,6 +70,7 @@ impl<'tcx, O: TypeFoldable<'tcx>> TypeFoldable<'tcx> for traits::Obligation<'tcx
     }
 
     fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<V::BreakTy> {
-        self.predicate.visit_with(visitor)
+        self.predicate.visit_with(visitor)?;
+        self.param_env.visit_with(visitor)
     }
 }