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