11error: malformed `rustc_on_unimplemented` attribute input
2- --> $DIR/bad-annotation.rs:17 :1
2+ --> $DIR/bad-annotation.rs:15 :1
33 |
44LL | #[rustc_on_unimplemented]
55 | ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -12,72 +12,96 @@ LL | #[rustc_on_unimplemented(/*opt*/ message = "...", /*opt*/ label = "...", /*
1212 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1313
1414error[E0230]: cannot find parameter C on this trait
15- --> $DIR/bad-annotation.rs:22 :90
15+ --> $DIR/bad-annotation.rs:19 :90
1616 |
1717LL | #[rustc_on_unimplemented = "Unimplemented trait error on `{Self}` with params `<{A},{B},{C}>`"]
1818 | ^
1919
2020error[E0231]: positional format arguments are not allowed here
21- --> $DIR/bad-annotation.rs:27 :90
21+ --> $DIR/bad-annotation.rs:23 :90
2222 |
2323LL | #[rustc_on_unimplemented = "Unimplemented trait error on `{Self}` with params `<{A},{B},{}>`"]
2424 | ^
2525
2626error[E0232]: this attribute must have a valid value
27- --> $DIR/bad-annotation.rs:32 :26
27+ --> $DIR/bad-annotation.rs:27 :26
2828 |
29- LL | #[rustc_on_unimplemented(lorem= "")]
30- | ^^^^^^^^ expected value here
29+ LL | #[rustc_on_unimplemented(lorem = "")]
30+ | ^^^^^^^^^^ expected value here
3131 |
3232 = note: eg `#[rustc_on_unimplemented(message="foo")]`
3333
3434error[E0232]: this attribute must have a valid value
35- --> $DIR/bad-annotation.rs:36 :26
35+ --> $DIR/bad-annotation.rs:31 :26
3636 |
3737LL | #[rustc_on_unimplemented(lorem(ipsum(dolor)))]
3838 | ^^^^^^^^^^^^^^^^^^^ expected value here
3939 |
4040 = note: eg `#[rustc_on_unimplemented(message="foo")]`
4141
4242error[E0232]: this attribute must have a valid value
43- --> $DIR/bad-annotation.rs:40:39
43+ --> $DIR/bad-annotation.rs:35:41
4444 |
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
4747 |
4848 = note: eg `#[rustc_on_unimplemented(message="foo")]`
4949
5050error[E0232]: this attribute must have a valid value
51- --> $DIR/bad-annotation.rs:44:39
51+ --> $DIR/bad-annotation.rs:39:41
5252 |
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
5555 |
5656 = note: eg `#[rustc_on_unimplemented(message="foo")]`
5757
5858error[E0232]: empty `on`-clause in `#[rustc_on_unimplemented]`
59- --> $DIR/bad-annotation.rs:48 :26
59+ --> $DIR/bad-annotation.rs:43 :26
6060 |
61- LL | #[rustc_on_unimplemented(on(), message= "y")]
61+ LL | #[rustc_on_unimplemented(on(), message = "y")]
6262 | ^^^^ empty on-clause here
6363
6464error[E0232]: this attribute must have a valid value
65- --> $DIR/bad-annotation.rs:52 :26
65+ --> $DIR/bad-annotation.rs:47 :26
6666 |
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
6969 |
7070 = note: eg `#[rustc_on_unimplemented(message="foo")]`
7171
7272error[E0232]: this attribute must have a valid value
73- --> $DIR/bad-annotation.rs:59 :40
73+ --> $DIR/bad-annotation.rs:54 :40
7474 |
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
7777 |
7878 = note: eg `#[rustc_on_unimplemented(message="foo")]`
7979
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
81105
82- Some errors have detailed explanations: E0230, E0231, E0232.
106+ Some errors have detailed explanations: E0230, E0231, E0232, E0536 .
83107For more information about an error, try `rustc --explain E0230`.
0 commit comments