Skip to content

Commit

Permalink
Remove bogus {code} attributes on TraitImplMismatch.
Browse files Browse the repository at this point in the history
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.)
  • Loading branch information
nnethercote committed Jan 15, 2024
1 parent 5cbf41f commit dcafd97
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions compiler/rustc_resolve/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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)]
Expand Down

0 comments on commit dcafd97

Please sign in to comment.