about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2021-09-16 10:57:19 -0700
committerGitHub <noreply@github.com>2021-09-16 10:57:19 -0700
commitb66c9c3ac17a0b8a3053d03e1d1990595fd2a019 (patch)
tree3f6479ffe29c10a52679ee12d14f79188d6cb82e
parent2c7d48b9003d7f6f3babd9fa0b3fc1ba94df5ec1 (diff)
parente1873ba007149e69bb996f7becadc796ed87fc0c (diff)
downloadrust-b66c9c3ac17a0b8a3053d03e1d1990595fd2a019.tar.gz
rust-b66c9c3ac17a0b8a3053d03e1d1990595fd2a019.zip
Rollup merge of #88875 - notriddle:notriddle/cleanup-unused-trait-selection, r=Mark-Simulacrum
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.
-rw-r--r--compiler/rustc_span/src/symbol.rs1
-rw-r--r--compiler/rustc_trait_selection/src/traits/error_reporting/on_unimplemented.rs3
2 files changed, 0 insertions, 4 deletions
diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs
index 4b416f29f26..d14feecbbdf 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));