From dcafd97aeaccec67c16c544b3fa31eed245d9ed2 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Sun, 14 Jan 2024 22:18:48 +1100 Subject: [PATCH] Remove bogus `{code}` attributes on `TraitImplMismatch`. This makes no sense, and has no effect. I suspect it's been confused with a `code = "{code}"` attribute on a subdiagnostic suggestion, where it is valid (but the "code" there is suggested source code, rather than an error code.) --- compiler/rustc_resolve/src/errors.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/rustc_resolve/src/errors.rs b/compiler/rustc_resolve/src/errors.rs index 1fdb193e571f1..6b5108c37177b 100644 --- a/compiler/rustc_resolve/src/errors.rs +++ b/compiler/rustc_resolve/src/errors.rs @@ -456,7 +456,7 @@ pub(crate) struct UnreachableLabelSubLabelUnreachable { } #[derive(Diagnostic)] -#[diag(resolve_trait_impl_mismatch, code = "{code}")] +#[diag(resolve_trait_impl_mismatch)] pub(crate) struct TraitImplMismatch { #[primary_span] #[label] @@ -466,7 +466,6 @@ pub(crate) struct TraitImplMismatch { #[label(resolve_label_trait_item)] pub(crate) trait_item_span: Span, pub(crate) trait_path: String, - pub(crate) code: String, } #[derive(Diagnostic)]