File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -45,3 +45,10 @@ extern "C" {}
45
45
//~^ ERROR invalid suffix `suffix` for number literal
46
46
//~| ERROR malformed `rustc_layout_scalar_valid_range_start` attribute input
47
47
struct S ;
48
+
49
+ impl S {
50
+ #[ rustc_confusables( "blah" suffix) ]
51
+ //~^ ERROR suffixes on string literals are invalid
52
+ //~| ERROR malformed `rustc_confusables` attribute input
53
+ fn woof ( ) { }
54
+ }
Original file line number Diff line number Diff line change @@ -202,6 +202,21 @@ LL | #[rustc_layout_scalar_valid_range_start(0suffix)]
202
202
| | expected an integer literal here
203
203
| help: must be of the form: `#[rustc_layout_scalar_valid_range_start(start)]`
204
204
205
- error: aborting due to 23 previous errors; 2 warnings emitted
205
+ error: suffixes on string literals are invalid
206
+ --> $DIR/bad-lit-suffixes.rs:50:25
207
+ |
208
+ LL | #[rustc_confusables("blah"suffix)]
209
+ | ^^^^^^^^^^^^ invalid suffix `suffix`
210
+
211
+ error[E0539]: malformed `rustc_confusables` attribute input
212
+ --> $DIR/bad-lit-suffixes.rs:50:5
213
+ |
214
+ LL | #[rustc_confusables("blah"suffix)]
215
+ | ^^^^^^^^^^^^^^^^^^^^------------^^
216
+ | | |
217
+ | | expected a string literal here
218
+ | help: must be of the form: `#[rustc_confusables("name1", "name2", ...)]`
219
+
220
+ error: aborting due to 25 previous errors; 2 warnings emitted
206
221
207
222
For more information about this error, try `rustc --explain E0539`.
You can’t perform that action at this time.
0 commit comments