1
1
error: malformed `rustc_on_unimplemented` attribute input
2
- --> $DIR/bad-annotation.rs:17 :1
2
+ --> $DIR/bad-annotation.rs:15 :1
3
3
|
4
4
LL | #[rustc_on_unimplemented]
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -12,72 +12,96 @@ LL | #[rustc_on_unimplemented(/*opt*/ message = "...", /*opt*/ label = "...", /*
12
12
| ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
13
13
14
14
error[E0230]: cannot find parameter C on this trait
15
- --> $DIR/bad-annotation.rs:22 :90
15
+ --> $DIR/bad-annotation.rs:19 :90
16
16
|
17
17
LL | #[rustc_on_unimplemented = "Unimplemented trait error on `{Self}` with params `<{A},{B},{C}>`"]
18
18
| ^
19
19
20
20
error[E0231]: positional format arguments are not allowed here
21
- --> $DIR/bad-annotation.rs:27 :90
21
+ --> $DIR/bad-annotation.rs:23 :90
22
22
|
23
23
LL | #[rustc_on_unimplemented = "Unimplemented trait error on `{Self}` with params `<{A},{B},{}>`"]
24
24
| ^
25
25
26
26
error[E0232]: this attribute must have a valid value
27
- --> $DIR/bad-annotation.rs:32 :26
27
+ --> $DIR/bad-annotation.rs:27 :26
28
28
|
29
- LL | #[rustc_on_unimplemented(lorem= "")]
30
- | ^^^^^^^^ expected value here
29
+ LL | #[rustc_on_unimplemented(lorem = "")]
30
+ | ^^^^^^^^^^ expected value here
31
31
|
32
32
= note: eg `#[rustc_on_unimplemented(message="foo")]`
33
33
34
34
error[E0232]: this attribute must have a valid value
35
- --> $DIR/bad-annotation.rs:36 :26
35
+ --> $DIR/bad-annotation.rs:31 :26
36
36
|
37
37
LL | #[rustc_on_unimplemented(lorem(ipsum(dolor)))]
38
38
| ^^^^^^^^^^^^^^^^^^^ expected value here
39
39
|
40
40
= note: eg `#[rustc_on_unimplemented(message="foo")]`
41
41
42
42
error[E0232]: this attribute must have a valid value
43
- --> $DIR/bad-annotation.rs:40:39
43
+ --> $DIR/bad-annotation.rs:35:41
44
44
|
45
- LL | #[rustc_on_unimplemented(message= "x", message= "y")]
46
- | ^^^^^^^^^^^ expected value here
45
+ LL | #[rustc_on_unimplemented(message = "x", message = "y")]
46
+ | ^^ ^^^^^^^^^^^ expected value here
47
47
|
48
48
= note: eg `#[rustc_on_unimplemented(message="foo")]`
49
49
50
50
error[E0232]: this attribute must have a valid value
51
- --> $DIR/bad-annotation.rs:44:39
51
+ --> $DIR/bad-annotation.rs:39:41
52
52
|
53
- LL | #[rustc_on_unimplemented(message= "x", on(desugared, message= "y"))]
54
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected value here
53
+ LL | #[rustc_on_unimplemented(message = "x", on(desugared, message = "y"))]
54
+ | ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected value here
55
55
|
56
56
= note: eg `#[rustc_on_unimplemented(message="foo")]`
57
57
58
58
error[E0232]: empty `on`-clause in `#[rustc_on_unimplemented]`
59
- --> $DIR/bad-annotation.rs:48 :26
59
+ --> $DIR/bad-annotation.rs:43 :26
60
60
|
61
- LL | #[rustc_on_unimplemented(on(), message= "y")]
61
+ LL | #[rustc_on_unimplemented(on(), message = "y")]
62
62
| ^^^^ empty on-clause here
63
63
64
64
error[E0232]: this attribute must have a valid value
65
- --> $DIR/bad-annotation.rs:52 :26
65
+ --> $DIR/bad-annotation.rs:47 :26
66
66
|
67
- LL | #[rustc_on_unimplemented(on= "x", message= "y")]
68
- | ^^^^^^ expected value here
67
+ LL | #[rustc_on_unimplemented(on = "x", message = "y")]
68
+ | ^^^^^^^^ expected value here
69
69
|
70
70
= note: eg `#[rustc_on_unimplemented(message="foo")]`
71
71
72
72
error[E0232]: this attribute must have a valid value
73
- --> $DIR/bad-annotation.rs:59 :40
73
+ --> $DIR/bad-annotation.rs:54 :40
74
74
|
75
- LL | #[rustc_on_unimplemented(on(desugared, on(desugared, message= "x")), message= "y")]
76
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected value here
75
+ LL | #[rustc_on_unimplemented(on(desugared, on(desugared, message = "x")), message = "y")]
76
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected value here
77
77
|
78
78
= note: eg `#[rustc_on_unimplemented(message="foo")]`
79
79
80
- error: aborting due to 10 previous errors
80
+ error[E0232]: invalid `on`-clause in `#[rustc_on_unimplemented]`
81
+ --> $DIR/bad-annotation.rs:59:26
82
+ |
83
+ LL | #[rustc_on_unimplemented(on("y", message = "y"))]
84
+ | ^^^^^^^^^^^^^^^^^^^^^^ invalid on-clause here
85
+
86
+ error[E0536]: expected 1 cfg-pattern
87
+ --> $DIR/bad-annotation.rs:63:29
88
+ |
89
+ LL | #[rustc_on_unimplemented(on(not(a, b), message = "y"))]
90
+ | ^^^^^^^^^
91
+
92
+ error: `cfg` predicate key must be an identifier
93
+ --> $DIR/bad-annotation.rs:67:29
94
+ |
95
+ LL | #[rustc_on_unimplemented(on(thing::What, message = "y"))]
96
+ | ^^^^^^^^^^^
97
+
98
+ error: `cfg` predicate key must be an identifier
99
+ --> $DIR/bad-annotation.rs:71:29
100
+ |
101
+ LL | #[rustc_on_unimplemented(on(thing::What = "value", message = "y"))]
102
+ | ^^^^^^^^^^^
103
+
104
+ error: aborting due to 14 previous errors
81
105
82
- Some errors have detailed explanations: E0230, E0231, E0232.
106
+ Some errors have detailed explanations: E0230, E0231, E0232, E0536 .
83
107
For more information about an error, try `rustc --explain E0230`.
0 commit comments