You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LL | #[default] // also "HELP make `A` default", but compiletest can't handle multispans
10
+
LL | B,
11
+
| - additional default
12
+
|
13
+
= note: only one variant can be default
14
+
= note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)
15
+
16
+
error: multiple declared defaults
17
+
--> $DIR/multiple-defaults.rs:18:10
18
+
|
19
+
LL | #[derive(Default)]
20
+
| ^^^^^^^
21
+
...
22
+
LL | A,
23
+
| - first default
24
+
LL | #[default]
25
+
LL | A,
26
+
| - additional default
27
+
|
28
+
= note: only one variant can be default
29
+
= note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)
30
+
31
+
error[E0428]: the name `A` is defined multiple times
32
+
--> $DIR/multiple-defaults.rs:23:5
33
+
|
34
+
LL | A,
35
+
| - previous definition of the type `A` here
36
+
LL | #[default]
37
+
LL | A,
38
+
| ^ `A` redefined here
39
+
|
40
+
= note: `A` must be defined only once in the type namespace of this enum
41
+
42
+
error: multiple declared defaults
43
+
--> $DIR/multiple-defaults.rs:31:18
44
+
|
45
+
LL | #[derive(Default)]
46
+
| ^^^^^^^
47
+
...
48
+
LL | $id,
49
+
| ---
50
+
| |
51
+
| first default
52
+
| additional default
53
+
...
54
+
LL | m! { A B }
55
+
| ---------- in this macro invocation
56
+
|
57
+
= note: only one variant can be default
58
+
= note: this error originates in the derive macro `Default` which comes from the expansion of the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
59
+
60
+
error: aborting due to 4 previous errors
61
+
62
+
For more information about this error, try `rustc --explain E0428`.
0 commit comments