From ade2a96ff1e2c3d434f57b8fa07da66969bceaae Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Thu, 30 Jun 2022 13:24:35 +0000 Subject: [PATCH] use a method instead of manually doing what its body does --- compiler/rustc_infer/src/traits/project.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_infer/src/traits/project.rs b/compiler/rustc_infer/src/traits/project.rs index b84ed3dc689..18469208731 100644 --- a/compiler/rustc_infer/src/traits/project.rs +++ b/compiler/rustc_infer/src/traits/project.rs @@ -203,7 +203,7 @@ impl<'tcx> ProjectionCache<'_, 'tcx> { Some(&ProjectionCacheEntry::NormalizedTy { ref ty, complete: _ }) => { info!("ProjectionCacheEntry::complete({:?}) - completing {:?}", key, ty); let mut ty = ty.clone(); - if result == EvaluationResult::EvaluatedToOk { + if result.must_apply_considering_regions() { ty.obligations = vec![]; } map.insert(key, ProjectionCacheEntry::NormalizedTy { ty, complete: Some(result) });