From 9072c8d274307c08ad0a7afb16681d43181c4033 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Sat, 29 Jan 2022 15:34:06 -0800 Subject: skip pointing out ambuguous impls in alloc/std crates too --- compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler') diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs index f22b4e8d072..67b44f0a348 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs @@ -1973,7 +1973,7 @@ impl<'a, 'tcx> InferCtxtPrivExt<'a, 'tcx> for InferCtxt<'a, 'tcx> { if self.is_tainted_by_errors() && crate_names.len() == 1 - && crate_names[0] == "`core`" + && ["`core`", "`alloc`", "`std`"].contains(&crate_names[0].as_str()) && spans.len() == 0 { // Avoid complaining about other inference issues for expressions like -- cgit 1.4.1-3-g733a5