Use E0665 for missing #[default]
error
Use orphaned error code for the same error it belonged to before. ``` error[E0665]: `#[derive(Default)]` on enum with no `#[default]` --> $DIR/macros-nonfatal-errors.rs:42:10 | LL | #[derive(Default)] | ^^^^^^^ LL | / enum NoDeclaredDefault { LL | | Foo, LL | | Bar, LL | | } | |_- this enum needs a unit variant marked with `#[default]` | = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info) help: make this unit variant default by placing `#[default]` on it | LL | #[default] Foo, | ~~~~~~~~~~~~~~ help: make this unit variant default by placing `#[default]` on it | LL | #[default] Bar, | ~~~~~~~~~~~~~~ ```
This commit is contained in:
parent
d520b18316
commit
94812f1c8f
6 changed files with 84 additions and 53 deletions
|
@ -249,9 +249,9 @@ builtin_macros_naked_functions_testing_attribute =
|
|||
.label = function marked with testing attribute here
|
||||
.naked_attribute = `#[naked]` is incompatible with testing attributes
|
||||
|
||||
builtin_macros_no_default_variant = no default declared
|
||||
.help = make a unit variant default by placing `#[default]` above it
|
||||
.suggestion = make `{$ident}` default
|
||||
builtin_macros_no_default_variant = `#[derive(Default)]` on enum with no `#[default]`
|
||||
.label = this enum needs a unit variant marked with `#[default]`
|
||||
.suggestion = make this unit variant default by placing `#[default]` on it
|
||||
|
||||
builtin_macros_non_abi = at least one abi must be provided as an argument to `clobber_abi`
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue