fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69444 - pietroalbini:stable-next-final-v2-new, r=pietroalbinif3e1a954d2e

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