diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-12-22 03:49:43 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-22 03:49:43 +0100 |
| commit | 3a94f4c60feaa27e0b80766b940d815a504ff61e (patch) | |
| tree | 668c2bdd049bac450fb7f16ca61613f76bf7ee0c /src/ci/scripts/upload-build-metrics.py | |
| parent | 00bf74da6d1e8e49b18c0203e0cbd993fdac5663 (diff) | |
| parent | 94812f1c8f455579a3a1c127c2bbac48fc7cecef (diff) | |
| download | rust-3a94f4c60feaa27e0b80766b940d815a504ff61e.tar.gz rust-3a94f4c60feaa27e0b80766b940d815a504ff61e.zip | |
Rollup merge of #134364 - estebank:derive-docs, r=fmease
Use E0665 for missing `#[default]` on enum and update doc
The docs for E0665 when doing `#[derive(Default]` on an `enum` previously didn't mention `#[default]` at all, or made a distinction between unit variants, that can be annotated, and tuple or struct variants, which cannot.
E0665 was not being emitted, we now use it 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,
| ++++++++++
```
Diffstat (limited to 'src/ci/scripts/upload-build-metrics.py')
0 files changed, 0 insertions, 0 deletions
