Skip to content

Commit 1d02f4f

Browse files
Update tests
1 parent e0df2f8 commit 1d02f4f

11 files changed

+38
-28
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
error: `derive` may only be applied to structs, enums and unions
1+
error[E0774]: `derive` may only be applied to structs, enums and unions
22
--> $DIR/derive-on-trait-item-or-impl-item.rs:2:5
33
|
44
LL | #[derive(Clone)]
55
| ^^^^^^^^^^^^^^^^
66

7-
error: `derive` may only be applied to structs, enums and unions
7+
error[E0774]: `derive` may only be applied to structs, enums and unions
88
--> $DIR/derive-on-trait-item-or-impl-item.rs:10:5
99
|
1010
LL | #[derive(Clone)]
1111
| ^^^^^^^^^^^^^^^^
1212

1313
error: aborting due to 2 previous errors
1414

15+
For more information about this error, try `rustc --explain E0774`.
+10-9
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,57 @@
1-
error: `derive` may only be applied to structs, enums and unions
1+
error[E0774]: `derive` may only be applied to structs, enums and unions
22
--> $DIR/deriving-non-type.rs:5:1
33
|
44
LL | #[derive(PartialEq)]
55
| ^^^^^^^^^^^^^^^^^^^^
66

7-
error: `derive` may only be applied to structs, enums and unions
7+
error[E0774]: `derive` may only be applied to structs, enums and unions
88
--> $DIR/deriving-non-type.rs:8:1
99
|
1010
LL | #[derive(PartialEq)]
1111
| ^^^^^^^^^^^^^^^^^^^^
1212

13-
error: `derive` may only be applied to structs, enums and unions
13+
error[E0774]: `derive` may only be applied to structs, enums and unions
1414
--> $DIR/deriving-non-type.rs:11:1
1515
|
1616
LL | #[derive(PartialEq)]
1717
| ^^^^^^^^^^^^^^^^^^^^
1818

19-
error: `derive` may only be applied to structs, enums and unions
19+
error[E0774]: `derive` may only be applied to structs, enums and unions
2020
--> $DIR/deriving-non-type.rs:14:1
2121
|
2222
LL | #[derive(PartialEq)]
2323
| ^^^^^^^^^^^^^^^^^^^^
2424

25-
error: `derive` may only be applied to structs, enums and unions
25+
error[E0774]: `derive` may only be applied to structs, enums and unions
2626
--> $DIR/deriving-non-type.rs:17:1
2727
|
2828
LL | #[derive(PartialEq)]
2929
| ^^^^^^^^^^^^^^^^^^^^
3030

31-
error: `derive` may only be applied to structs, enums and unions
31+
error[E0774]: `derive` may only be applied to structs, enums and unions
3232
--> $DIR/deriving-non-type.rs:20:1
3333
|
3434
LL | #[derive(PartialEq)]
3535
| ^^^^^^^^^^^^^^^^^^^^
3636

37-
error: `derive` may only be applied to structs, enums and unions
37+
error[E0774]: `derive` may only be applied to structs, enums and unions
3838
--> $DIR/deriving-non-type.rs:23:1
3939
|
4040
LL | #[derive(PartialEq)]
4141
| ^^^^^^^^^^^^^^^^^^^^
4242

43-
error: `derive` may only be applied to structs, enums and unions
43+
error[E0774]: `derive` may only be applied to structs, enums and unions
4444
--> $DIR/deriving-non-type.rs:26:1
4545
|
4646
LL | #[derive(PartialEq)]
4747
| ^^^^^^^^^^^^^^^^^^^^
4848

49-
error: `derive` may only be applied to structs, enums and unions
49+
error[E0774]: `derive` may only be applied to structs, enums and unions
5050
--> $DIR/deriving-non-type.rs:29:1
5151
|
5252
LL | #[derive(PartialEq)]
5353
| ^^^^^^^^^^^^^^^^^^^^
5454

5555
error: aborting due to 9 previous errors
5656

57+
For more information about this error, try `rustc --explain E0774`.
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,33 @@
1-
error: `derive` may only be applied to structs, enums and unions
1+
error[E0774]: `derive` may only be applied to structs, enums and unions
22
--> $DIR/issue-43106-gating-of-derive.rs:4:1
33
|
44
LL | #[derive(Debug)]
55
| ^^^^^^^^^^^^^^^^
66

7-
error: `derive` may only be applied to structs, enums and unions
7+
error[E0774]: `derive` may only be applied to structs, enums and unions
88
--> $DIR/issue-43106-gating-of-derive.rs:7:17
99
|
1010
LL | mod inner { #![derive(Debug)] }
1111
| ^^^^^^^^^^^^^^^^^ help: try an outer attribute: `#[derive(Debug)]`
1212

13-
error: `derive` may only be applied to structs, enums and unions
13+
error[E0774]: `derive` may only be applied to structs, enums and unions
1414
--> $DIR/issue-43106-gating-of-derive.rs:10:5
1515
|
1616
LL | #[derive(Debug)]
1717
| ^^^^^^^^^^^^^^^^
1818

19-
error: `derive` may only be applied to structs, enums and unions
19+
error[E0774]: `derive` may only be applied to structs, enums and unions
2020
--> $DIR/issue-43106-gating-of-derive.rs:23:5
2121
|
2222
LL | #[derive(Debug)]
2323
| ^^^^^^^^^^^^^^^^
2424

25-
error: `derive` may only be applied to structs, enums and unions
25+
error[E0774]: `derive` may only be applied to structs, enums and unions
2626
--> $DIR/issue-43106-gating-of-derive.rs:27:5
2727
|
2828
LL | #[derive(Debug)]
2929
| ^^^^^^^^^^^^^^^^
3030

3131
error: aborting due to 5 previous errors
3232

33+
For more information about this error, try `rustc --explain E0774`.

src/test/ui/issues/issue-36617.stderr

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: `derive` may only be applied to structs, enums and unions
1+
error[E0774]: `derive` may only be applied to structs, enums and unions
22
--> $DIR/issue-36617.rs:1:1
33
|
44
LL | #![derive(Copy)]
@@ -22,3 +22,4 @@ LL | #![derive(Copy)]
2222

2323
error: aborting due to 3 previous errors
2424

25+
For more information about this error, try `rustc --explain E0774`.

src/test/ui/issues/issue-43023.stderr

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
error: `derive` may only be applied to structs, enums and unions
1+
error[E0774]: `derive` may only be applied to structs, enums and unions
22
--> $DIR/issue-43023.rs:4:5
33
|
44
LL | #[derive(Debug)]
55
| ^^^^^^^^^^^^^^^^
66

7-
error: `derive` may only be applied to structs, enums and unions
7+
error[E0774]: `derive` may only be applied to structs, enums and unions
88
--> $DIR/issue-43023.rs:11:5
99
|
1010
LL | #[derive(Debug)]
1111
| ^^^^^^^^^^^^^^^^
1212

13-
error: `derive` may only be applied to structs, enums and unions
13+
error[E0774]: `derive` may only be applied to structs, enums and unions
1414
--> $DIR/issue-43023.rs:16:5
1515
|
1616
LL | #[derive(Debug)]
1717
| ^^^^^^^^^^^^^^^^
1818

1919
error: aborting due to 3 previous errors
2020

21+
For more information about this error, try `rustc --explain E0774`.

src/test/ui/issues/issue-49934-errors.stderr

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: `derive` may only be applied to structs, enums and unions
1+
error[E0774]: `derive` may only be applied to structs, enums and unions
22
--> $DIR/issue-49934-errors.rs:1:8
33
|
44
LL | fn foo<#[derive(Debug)] T>() {
@@ -10,7 +10,7 @@ error: expected an inert attribute, found a derive macro
1010
LL | fn foo<#[derive(Debug)] T>() {
1111
| ^^^^^
1212

13-
error: `derive` may only be applied to structs, enums and unions
13+
error[E0774]: `derive` may only be applied to structs, enums and unions
1414
--> $DIR/issue-49934-errors.rs:5:9
1515
|
1616
LL | #[derive(Debug)]
@@ -24,3 +24,4 @@ LL | #[derive(Debug)]
2424

2525
error: aborting due to 4 previous errors
2626

27+
For more information about this error, try `rustc --explain E0774`.

src/test/ui/macros/trace_faulty_macros.stderr

+2-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ LL | let a = pat_macro!();
6060
|
6161
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
6262

63-
error: `derive` may only be applied to structs, enums and unions
63+
error[E0774]: `derive` may only be applied to structs, enums and unions
6464
--> $DIR/trace_faulty_macros.rs:42:1
6565
|
6666
LL | #[derive(Debug)]
@@ -79,3 +79,4 @@ LL | let a = pat_macro!();
7979

8080
error: aborting due to 4 previous errors
8181

82+
For more information about this error, try `rustc --explain E0774`.

src/test/ui/malformed/issue-69341-malformed-derive-inert.stderr

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: traits in `#[derive(...)]` don't accept arguments
44
LL | #[derive(parse())]
55
| ^^ help: remove the arguments
66

7-
error: `derive` may only be applied to structs, enums and unions
7+
error[E0774]: `derive` may only be applied to structs, enums and unions
88
--> $DIR/issue-69341-malformed-derive-inert.rs:8:5
99
|
1010
LL | path: (),
@@ -24,3 +24,4 @@ LL | #[derive(parse())]
2424

2525
error: aborting due to 4 previous errors
2626

27+
For more information about this error, try `rustc --explain E0774`.

src/test/ui/proc-macro/attributes-on-modules-fail.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: `derive` may only be applied to structs, enums and unions
1+
error[E0774]: `derive` may only be applied to structs, enums and unions
22
--> $DIR/attributes-on-modules-fail.rs:16:1
33
|
44
LL | #[derive(Copy)]
@@ -64,5 +64,5 @@ LL | use m::X;
6464

6565
error: aborting due to 7 previous errors
6666

67-
Some errors have detailed explanations: E0412, E0658.
67+
Some errors have detailed explanations: E0412, E0658, E0774.
6868
For more information about an error, try `rustc --explain E0412`.
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
error: `derive` may only be applied to structs, enums and unions
1+
error[E0774]: `derive` may only be applied to structs, enums and unions
22
--> $DIR/macros-in-extern-derive.rs:2:5
33
|
44
LL | #[derive(Copy)]
55
| ^^^^^^^^^^^^^^^
66

77
error: aborting due to previous error
88

9+
For more information about this error, try `rustc --explain E0774`.

src/test/ui/span/issue-43927-non-ADT-derive.stderr

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: `derive` may only be applied to structs, enums and unions
1+
error[E0774]: `derive` may only be applied to structs, enums and unions
22
--> $DIR/issue-43927-non-ADT-derive.rs:3:1
33
|
44
LL | #![derive(Debug, PartialEq, Eq)] // should be an outer attribute!
@@ -54,3 +54,4 @@ LL | #![derive(Debug, PartialEq, Eq)] // should be an outer attribute!
5454

5555
error: aborting due to 7 previous errors
5656

57+
For more information about this error, try `rustc --explain E0774`.

0 commit comments

Comments
 (0)