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 @@ -44,3 +44,10 @@ extern "C" {}
4444//~^ ERROR invalid suffix `suffix` for number literal
4545//~| ERROR malformed `rustc_layout_scalar_valid_range_start` attribute input
4646struct S ;
47+
48+ impl S {
49+ #[ rustc_confusables( "blah" suffix) ]
50+ //~^ ERROR suffixes on string literals are invalid
51+ //~| ERROR malformed `rustc_confusables` attribute input
52+ fn woof ( ) { }
53+ }
Original file line number Diff line number Diff line change @@ -177,6 +177,21 @@ LL | #[rustc_layout_scalar_valid_range_start(0suffix)]
177177 | | expected an integer literal here
178178 | help: must be of the form: `#[rustc_layout_scalar_valid_range_start(start)]`
179179
180- error: aborting due to 22 previous errors; 2 warnings emitted
180+ error: suffixes on string literals are invalid
181+ --> $DIR/bad-lit-suffixes.rs:49:25
182+ |
183+ LL | #[rustc_confusables("blah"suffix)]
184+ | ^^^^^^^^^^^^ invalid suffix `suffix`
185+
186+ error[E0539]: malformed `rustc_confusables` attribute input
187+ --> $DIR/bad-lit-suffixes.rs:49:5
188+ |
189+ LL | #[rustc_confusables("blah"suffix)]
190+ | ^^^^^^^^^^^^^^^^^^^^------------^^
191+ | | |
192+ | | expected a string literal here
193+ | help: must be of the form: `#[rustc_confusables("name1", "name2", ...)]`
194+
195+ error: aborting due to 24 previous errors; 2 warnings emitted
181196
182197For more information about this error, try `rustc --explain E0539`.
You can’t perform that action at this time.
0 commit comments