1- error[E0232]: this attribute must have a value
2- --> $DIR/bad-annotation.rs:29:26
3- |
4- LL | #[rustc_on_unimplemented(lorem = "")]
5- | ^^^^^^^^^^ expected value here
6- |
7- = note: e.g. `#[rustc_on_unimplemented(message="foo")]`
8-
9- error[E0232]: this attribute must have a value
10- --> $DIR/bad-annotation.rs:35:26
11- |
12- LL | #[rustc_on_unimplemented(lorem(ipsum(dolor)))]
13- | ^^^^^^^^^^^^^^^^^^^ expected value here
14- |
15- = note: e.g. `#[rustc_on_unimplemented(message="foo")]`
16-
17- error[E0232]: this attribute must have a value
18- --> $DIR/bad-annotation.rs:41:41
19- |
20- LL | #[rustc_on_unimplemented(message = "x", message = "y")]
21- | ^^^^^^^^^^^^^ expected value here
22- |
23- = note: e.g. `#[rustc_on_unimplemented(message="foo")]`
24-
251error[E0232]: invalid flag in `on`-clause
26- --> $DIR/bad-annotation.rs:47 :44
2+ --> $DIR/bad-annotation.rs:45 :44
273 |
284LL | #[rustc_on_unimplemented(message = "x", on(desugared, message = "y"))]
295 | ^^^^^^^^^ expected one of the `crate_local`, `direct` or `from_desugaring` flags, not `desugared`
306
317error[E0232]: empty `on`-clause in `#[rustc_on_unimplemented]`
32- --> $DIR/bad-annotation.rs:52 :26
8+ --> $DIR/bad-annotation.rs:50 :26
339 |
3410LL | #[rustc_on_unimplemented(on(), message = "y")]
3511 | ^^^^ empty `on`-clause here
3612
37- error[E0232]: this attribute must have a value
38- --> $DIR/bad-annotation.rs:57:26
39- |
40- LL | #[rustc_on_unimplemented(on = "x", message = "y")]
41- | ^^^^^^^^ expected value here
42- |
43- = note: e.g. `#[rustc_on_unimplemented(message="foo")]`
44-
45- error[E0232]: this attribute must have a value
46- --> $DIR/bad-annotation.rs:63:26
47- |
48- LL | #[rustc_on_unimplemented(on(Self = "y"), message = "y")]
49- | ^^^^^^^^^^^^^^ expected value here
50- |
51- = note: e.g. `#[rustc_on_unimplemented(message="foo")]`
52-
53- error[E0232]: this attribute must have a value
54- --> $DIR/bad-annotation.rs:69:46
55- |
56- LL | #[rustc_on_unimplemented(on(from_desugaring, on(from_desugaring, message = "x")), message = "y")]
57- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected value here
58- |
59- = note: e.g. `#[rustc_on_unimplemented(message="foo")]`
60-
6113error[E0232]: literals inside `on`-clauses are not supported
62- --> $DIR/bad-annotation.rs:75 :29
14+ --> $DIR/bad-annotation.rs:70 :29
6315 |
6416LL | #[rustc_on_unimplemented(on("y", message = "y"))]
6517 | ^^^ unexpected literal here
6618
6719error[E0232]: literals inside `on`-clauses are not supported
68- --> $DIR/bad-annotation.rs:80 :29
20+ --> $DIR/bad-annotation.rs:75 :29
6921 |
7022LL | #[rustc_on_unimplemented(on(42, message = "y"))]
7123 | ^^ unexpected literal here
7224
7325error[E0232]: expected a single predicate in `not(..)`
74- --> $DIR/bad-annotation.rs:85 :32
26+ --> $DIR/bad-annotation.rs:80 :32
7527 |
7628LL | #[rustc_on_unimplemented(on(not(a, b), message = "y"))]
7729 | ^^^^^^ unexpected quantity of predicates here
7830
7931error[E0232]: expected a single predicate in `not(..)`
80- --> $DIR/bad-annotation.rs:90 :32
32+ --> $DIR/bad-annotation.rs:85 :32
8133 |
8234LL | #[rustc_on_unimplemented(on(not(), message = "y"))]
8335 | ^^ unexpected quantity of predicates here
8436
8537error[E0232]: expected an identifier inside this `on`-clause
86- --> $DIR/bad-annotation.rs:95 :29
38+ --> $DIR/bad-annotation.rs:90 :29
8739 |
8840LL | #[rustc_on_unimplemented(on(thing::What, message = "y"))]
8941 | ^^^^^^^^^^^ expected an identifier here, not `thing::What`
9042
9143error[E0232]: expected an identifier inside this `on`-clause
92- --> $DIR/bad-annotation.rs:100 :29
44+ --> $DIR/bad-annotation.rs:95 :29
9345 |
9446LL | #[rustc_on_unimplemented(on(thing::What = "value", message = "y"))]
9547 | ^^^^^^^^^^^ expected an identifier here, not `thing::What`
9648
9749error[E0232]: this predicate is invalid
98- --> $DIR/bad-annotation.rs:105 :29
50+ --> $DIR/bad-annotation.rs:100 :29
9951 |
10052LL | #[rustc_on_unimplemented(on(aaaaaaaaaaaaaa(a, b), message = "y"))]
10153 | ^^^^^^^^^^^^^^ expected one of `any`, `all` or `not` here, not `aaaaaaaaaaaaaa`
10254
10355error[E0232]: invalid flag in `on`-clause
104- --> $DIR/bad-annotation.rs:110 :29
56+ --> $DIR/bad-annotation.rs:105 :29
10557 |
10658LL | #[rustc_on_unimplemented(on(something, message = "y"))]
10759 | ^^^^^^^^^ expected one of the `crate_local`, `direct` or `from_desugaring` flags, not `something`
@@ -115,13 +67,13 @@ LL | #[rustc_on_unimplemented(label = "Unimplemented error on `{Self}` with para
11567 = note: `#[warn(malformed_diagnostic_format_literals)]` (part of `#[warn(unknown_or_malformed_diagnostic_attributes)]`) on by default
11668
11769warning: there is no parameter `_Self` on trait `InvalidName`
118- --> $DIR/bad-annotation.rs:115 :29
70+ --> $DIR/bad-annotation.rs:110 :29
11971 |
12072LL | #[rustc_on_unimplemented(on(_Self = "y", message = "y"))]
12173 | ^^^^^^^^^^^
12274
12375warning: there is no parameter `abc` on trait `InvalidName2`
124- --> $DIR/bad-annotation.rs:119 :29
76+ --> $DIR/bad-annotation.rs:114 :29
12577 |
12678LL | #[rustc_on_unimplemented(on(abc = "y", message = "y"))]
12779 | ^^^^^^^^^
@@ -143,6 +95,54 @@ LL | #[rustc_on_unimplemented(label = "Unimplemented error on `{Self}` with para
14395 |
14496 = help: only named format arguments with the name of one of the generic types are allowed in this context
14597
146- error: aborting due to 16 previous errors; 5 warnings emitted
98+ warning: malformed `rustc_on_unimplemented` attribute
99+ --> $DIR/bad-annotation.rs:29:26
100+ |
101+ LL | #[rustc_on_unimplemented(lorem = "")]
102+ | ^^^^^^^^^^ invalid option found here
103+ |
104+ = help: only `message`, `note` and `label` are allowed as options
105+
106+ warning: malformed `rustc_on_unimplemented` attribute
107+ --> $DIR/bad-annotation.rs:34:26
108+ |
109+ LL | #[rustc_on_unimplemented(lorem(ipsum(dolor)))]
110+ | ^^^^^^^^^^^^^^^^^^^ invalid option found here
111+ |
112+ = help: only `message`, `note` and `label` are allowed as options
113+
114+ warning: `message` is ignored due to previous definition of `message`
115+ --> $DIR/bad-annotation.rs:39:41
116+ |
117+ LL | #[rustc_on_unimplemented(message = "x", message = "y")]
118+ | ------------- ^^^^^^^^^^^^^ `message` is later redundantly declared here
119+ | |
120+ | `message` is first declared here
121+
122+ warning: malformed `rustc_on_unimplemented` attribute
123+ --> $DIR/bad-annotation.rs:55:26
124+ |
125+ LL | #[rustc_on_unimplemented(on = "x", message = "y")]
126+ | ^^^^^^^^ invalid option found here
127+ |
128+ = help: only `message`, `note` and `label` are allowed as options
129+
130+ warning: malformed `rustc_on_unimplemented` attribute
131+ --> $DIR/bad-annotation.rs:60:26
132+ |
133+ LL | #[rustc_on_unimplemented(on(Self = "y"), message = "y")]
134+ | ^^^^^^^^^^^^^^ invalid option found here
135+ |
136+ = help: only `message`, `note` and `label` are allowed as options
137+
138+ warning: malformed `rustc_on_unimplemented` attribute
139+ --> $DIR/bad-annotation.rs:65:46
140+ |
141+ LL | #[rustc_on_unimplemented(on(from_desugaring, on(from_desugaring, message = "x")), message = "y")]
142+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid option found here
143+ |
144+ = help: only `message`, `note` and `label` are allowed as options
145+
146+ error: aborting due to 10 previous errors; 11 warnings emitted
147147
148148For more information about this error, try `rustc --explain E0232`.
0 commit comments