|
1 |
| -warning: argument must be of the form: `expected = "error message"` |
2 |
| - --> $DIR/test-should-panic-attr.rs:11:1 |
| 1 | +error[E0539]: malformed `should_panic` attribute input |
| 2 | + --> $DIR/test-should-panic-attr.rs:10:1 |
3 | 3 | |
|
4 | 4 | LL | #[should_panic(expected)]
|
5 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 5 | + | ^^^^^^^^^^^^^^^--------^^ |
| 6 | + | | |
| 7 | + | expected this to be of the form `expected = "..."` |
| 8 | + | |
| 9 | +help: try changing it to one of the following valid forms of the attribute |
| 10 | + | |
| 11 | +LL - #[should_panic(expected)] |
| 12 | +LL + #[should_panic = "reason"] |
| 13 | + | |
| 14 | +LL | #[should_panic(expected = "reason")] |
| 15 | + | ++++++++++ |
| 16 | +LL - #[should_panic(expected)] |
| 17 | +LL + #[should_panic] |
6 | 18 | |
|
7 |
| - = note: errors in this attribute were erroneously allowed and will become a hard error in a future release |
8 | 19 |
|
9 |
| -warning: argument must be of the form: `expected = "error message"` |
| 20 | +error[E0539]: malformed `should_panic` attribute input |
10 | 21 | --> $DIR/test-should-panic-attr.rs:18:1
|
11 | 22 | |
|
12 | 23 | LL | #[should_panic(expect)]
|
13 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^ |
| 24 | + | ^^^^^^^^^^^^^^--------^ |
| 25 | + | | |
| 26 | + | the only valid argument here is "expected" |
| 27 | + | |
| 28 | +help: try changing it to one of the following valid forms of the attribute |
| 29 | + | |
| 30 | +LL - #[should_panic(expect)] |
| 31 | +LL + #[should_panic = "reason"] |
| 32 | + | |
| 33 | +LL | #[should_panic(expected = "reason")] |
| 34 | + | +++++++++++++ |
| 35 | +LL - #[should_panic(expect)] |
| 36 | +LL + #[should_panic] |
14 | 37 | |
|
15 |
| - = note: errors in this attribute were erroneously allowed and will become a hard error in a future release |
16 | 38 |
|
17 |
| -warning: argument must be of the form: `expected = "error message"` |
18 |
| - --> $DIR/test-should-panic-attr.rs:25:1 |
| 39 | +error[E0539]: malformed `should_panic` attribute input |
| 40 | + --> $DIR/test-should-panic-attr.rs:26:1 |
19 | 41 | |
|
20 | 42 | LL | #[should_panic(expected(foo, bar))]
|
21 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 43 | + | ^^^^^^^^^^^^^^^------------------^^ |
| 44 | + | | |
| 45 | + | expected this to be of the form `expected = "..."` |
| 46 | + | |
| 47 | +help: try changing it to one of the following valid forms of the attribute |
| 48 | + | |
| 49 | +LL - #[should_panic(expected(foo, bar))] |
| 50 | +LL + #[should_panic = "reason"] |
| 51 | + | |
| 52 | +LL - #[should_panic(expected(foo, bar))] |
| 53 | +LL + #[should_panic(expected = "reason")] |
| 54 | + | |
| 55 | +LL - #[should_panic(expected(foo, bar))] |
| 56 | +LL + #[should_panic] |
22 | 57 | |
|
23 |
| - = note: errors in this attribute were erroneously allowed and will become a hard error in a future release |
24 | 58 |
|
25 |
| -warning: argument must be of the form: `expected = "error message"` |
26 |
| - --> $DIR/test-should-panic-attr.rs:32:1 |
| 59 | +error[E0805]: malformed `should_panic` attribute input |
| 60 | + --> $DIR/test-should-panic-attr.rs:34:1 |
27 | 61 | |
|
28 | 62 | LL | #[should_panic(expected = "foo", bar)]
|
29 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 63 | + | ^^^^^^^^^^^^^^-----------------------^ |
| 64 | + | | |
| 65 | + | expected a single argument here |
| 66 | + | |
| 67 | +help: try changing it to one of the following valid forms of the attribute |
| 68 | + | |
| 69 | +LL - #[should_panic(expected = "foo", bar)] |
| 70 | +LL + #[should_panic = "reason"] |
| 71 | + | |
| 72 | +LL - #[should_panic(expected = "foo", bar)] |
| 73 | +LL + #[should_panic(expected = "reason")] |
| 74 | + | |
| 75 | +LL - #[should_panic(expected = "foo", bar)] |
| 76 | +LL + #[should_panic] |
30 | 77 | |
|
31 |
| - = note: errors in this attribute were erroneously allowed and will become a hard error in a future release |
32 | 78 |
|
33 |
| -warning: 4 warnings emitted |
| 79 | +error: aborting due to 4 previous errors |
34 | 80 |
|
| 81 | +Some errors have detailed explanations: E0539, E0805. |
| 82 | +For more information about an error, try `rustc --explain E0539`. |
0 commit comments