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.)
This commit is contained in:
Nicholas Nethercote 2024-01-14 22:18:48 +11:00
parent d91d164b00
commit 0321de2778

View File

@ -456,7 +456,7 @@ pub(crate) struct UnreachableLabelSubLabelUnreachable {
} }
#[derive(Diagnostic)] #[derive(Diagnostic)]
#[diag(resolve_trait_impl_mismatch, code = "{code}")] #[diag(resolve_trait_impl_mismatch)]
pub(crate) struct TraitImplMismatch { pub(crate) struct TraitImplMismatch {
#[primary_span] #[primary_span]
#[label] #[label]
@ -466,7 +466,6 @@ pub(crate) struct TraitImplMismatch {
#[label(resolve_label_trait_item)] #[label(resolve_label_trait_item)]
pub(crate) trait_item_span: Span, pub(crate) trait_item_span: Span,
pub(crate) trait_path: String, pub(crate) trait_path: String,
pub(crate) code: String,
} }
#[derive(Diagnostic)] #[derive(Diagnostic)]