diff options
| author | bors <bors@rust-lang.org> | 2024-12-22 05:29:45 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-12-22 05:29:45 +0000 |
| commit | a2bcfae5c5d05dd7806a79194cda39108ed6cd7d (patch) | |
| tree | 6d0a6fd8975fc2c731d6ae666db72e63e94f1913 /compiler/rustc_builtin_macros/src/errors.rs | |
| parent | c1132470a6986b12503e8000e322e9164c1f03ac (diff) | |
| parent | 66dbfd4af3069cc2454a982e441aecd1a21616ae (diff) | |
| download | rust-a2bcfae5c5d05dd7806a79194cda39108ed6cd7d.tar.gz rust-a2bcfae5c5d05dd7806a79194cda39108ed6cd7d.zip | |
Auto merge of #134640 - matthiaskrgr:rollup-xlstm3o, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - #134364 (Use E0665 for missing `#[default]` on enum and update doc) - #134601 (Support pretty-printing `dyn*` trait objects) - #134603 (Explain why a type is not eligible for `impl PointerLike`.) - #134618 (coroutine_clone: add comments) - #134630 (Use `&raw` for `ptr` primitive docs) - #134637 (Flatten effects directory now that it doesn't really test anything specific) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_builtin_macros/src/errors.rs')
| -rw-r--r-- | compiler/rustc_builtin_macros/src/errors.rs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/compiler/rustc_builtin_macros/src/errors.rs b/compiler/rustc_builtin_macros/src/errors.rs index b3198e7743d..1abdfdb9c65 100644 --- a/compiler/rustc_builtin_macros/src/errors.rs +++ b/compiler/rustc_builtin_macros/src/errors.rs @@ -369,26 +369,21 @@ pub(crate) struct DerivePathArgsValue { } #[derive(Diagnostic)] -#[diag(builtin_macros_no_default_variant)] -#[help] +#[diag(builtin_macros_no_default_variant, code = E0665)] pub(crate) struct NoDefaultVariant { #[primary_span] pub(crate) span: Span, + #[label] + pub(crate) item_span: Span, #[subdiagnostic] pub(crate) suggs: Vec<NoDefaultVariantSugg>, } #[derive(Subdiagnostic)] -#[suggestion( - builtin_macros_suggestion, - code = "#[default] {ident}", - applicability = "maybe-incorrect", - style = "tool-only" -)] +#[suggestion(builtin_macros_suggestion, code = "#[default] ", applicability = "maybe-incorrect")] pub(crate) struct NoDefaultVariantSugg { #[primary_span] pub(crate) span: Span, - pub(crate) ident: Ident, } #[derive(Diagnostic)] |
