From 28b6d2c28259769c31649f6b8c8497576adc6a76 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Fri, 18 Mar 2022 11:24:52 +0100 Subject: [PATCH] Fix incorrect auto trait displayed in rustdoc --- compiler/rustc_trait_selection/src/traits/select/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_trait_selection/src/traits/select/mod.rs b/compiler/rustc_trait_selection/src/traits/select/mod.rs index a1a8497859d..c3c5ae92039 100644 --- a/compiler/rustc_trait_selection/src/traits/select/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/select/mod.rs @@ -1270,7 +1270,7 @@ fn can_use_global_caches(&self, param_env: ty::ParamEnv<'tcx>) -> bool { // the master cache. Since coherence executes pretty quickly, // it's not worth going to more trouble to increase the // hit-rate, I don't think. - if self.intercrate { + if self.intercrate || self.allow_negative_impls { return false; } @@ -1287,7 +1287,7 @@ fn check_candidate_cache( // mode, so don't do any caching. In particular, we might // re-use the same `InferCtxt` with both an intercrate // and non-intercrate `SelectionContext` - if self.intercrate { + if self.intercrate || self.allow_negative_impls { return None; } let tcx = self.tcx(); -- 2.44.0