From e1873ba007149e69bb996f7becadc796ed87fc0c Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Sat, 11 Sep 2021 16:41:14 -0700 Subject: [PATCH] cleanup(rustc_trait_selection): remove vestigial code from rustc_on_unimplemented This isn't allowed by the validator, and seems to be unused. When it was added in ed10a3faae1fd1176b2edf4a61438e0542c103b9, it was used on `Sized`, and that usage is gone. --- compiler/rustc_span/src/symbol.rs | 1 - .../src/traits/error_reporting/on_unimplemented.rs | 3 --- 2 files changed, 4 deletions(-) diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index c816d060456..41ef0795f25 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -934,7 +934,6 @@ symbols! { panic_unwind, panicking, param_attrs, - parent_trait, partial_cmp, partial_ord, passes, diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/on_unimplemented.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/on_unimplemented.rs index 3a32f1cb903..6128c119b6b 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/on_unimplemented.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/on_unimplemented.rs @@ -154,9 +154,6 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> { flags.push((sym::from_method, Some(method.to_string()))); } } - if let Some((t, _)) = self.get_parent_trait_ref(&obligation.cause.code) { - flags.push((sym::parent_trait, Some(t))); - } if let Some(k) = obligation.cause.span.desugaring_kind() { flags.push((sym::from_desugaring, None));