]> git.lizzy.rs Git - rust.git/blob - src/test/ui/on-unimplemented/bad-annotation.stderr
Reword malformed attribute input diagnostics
[rust.git] / src / test / ui / on-unimplemented / bad-annotation.stderr
1 error: malformed `rustc_on_unimplemented` attribute input
2   --> $DIR/bad-annotation.rs:17:1
3    |
4 LL | #[rustc_on_unimplemented]
5    | ^^^^^^^^^^^^^^^^^^^^^^^^^
6 help: the following are the possible correct uses
7    |
8 LL | #[rustc_on_unimplemented(/*opt*/ message = "...", /*opt*/ label = "...", /*opt*/ note = "...")]
9    |
10 LL | #[rustc_on_unimplemented = "message"]
11    |
12
13 error[E0230]: there is no parameter `C` on trait `BadAnnotation2`
14   --> $DIR/bad-annotation.rs:22:1
15    |
16 LL | #[rustc_on_unimplemented = "Unimplemented trait error on `{Self}` with params `<{A},{B},{C}>`"]
17    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18
19 error[E0231]: only named substitution parameters are allowed
20   --> $DIR/bad-annotation.rs:27:1
21    |
22 LL | #[rustc_on_unimplemented = "Unimplemented trait error on `{Self}` with params `<{A},{B},{}>`"]
23    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24
25 error[E0232]: this attribute must have a valid value
26   --> $DIR/bad-annotation.rs:32:26
27    |
28 LL | #[rustc_on_unimplemented(lorem="")]
29    |                          ^^^^^^^^ expected value here
30    |
31    = note: eg `#[rustc_on_unimplemented(message="foo")]`
32
33 error[E0232]: this attribute must have a valid value
34   --> $DIR/bad-annotation.rs:36:26
35    |
36 LL | #[rustc_on_unimplemented(lorem(ipsum(dolor)))]
37    |                          ^^^^^^^^^^^^^^^^^^^ expected value here
38    |
39    = note: eg `#[rustc_on_unimplemented(message="foo")]`
40
41 error[E0232]: this attribute must have a valid value
42   --> $DIR/bad-annotation.rs:40:39
43    |
44 LL | #[rustc_on_unimplemented(message="x", message="y")]
45    |                                       ^^^^^^^^^^^ expected value here
46    |
47    = note: eg `#[rustc_on_unimplemented(message="foo")]`
48
49 error[E0232]: this attribute must have a valid value
50   --> $DIR/bad-annotation.rs:44:39
51    |
52 LL | #[rustc_on_unimplemented(message="x", on(desugared, message="y"))]
53    |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected value here
54    |
55    = note: eg `#[rustc_on_unimplemented(message="foo")]`
56
57 error[E0232]: empty `on`-clause in `#[rustc_on_unimplemented]`
58   --> $DIR/bad-annotation.rs:48:26
59    |
60 LL | #[rustc_on_unimplemented(on(), message="y")]
61    |                          ^^^^ empty on-clause here
62
63 error[E0232]: this attribute must have a valid value
64   --> $DIR/bad-annotation.rs:52:26
65    |
66 LL | #[rustc_on_unimplemented(on="x", message="y")]
67    |                          ^^^^^^ expected value here
68    |
69    = note: eg `#[rustc_on_unimplemented(message="foo")]`
70
71 error[E0232]: this attribute must have a valid value
72   --> $DIR/bad-annotation.rs:59:40
73    |
74 LL | #[rustc_on_unimplemented(on(desugared, on(desugared, message="x")), message="y")]
75    |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected value here
76    |
77    = note: eg `#[rustc_on_unimplemented(message="foo")]`
78
79 error: aborting due to 10 previous errors
80
81 Some errors have detailed explanations: E0230, E0231, E0232.
82 For more information about an error, try `rustc --explain E0230`.