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" {}
4545//~^ ERROR invalid suffix `suffix` for number literal 
4646//~| ERROR malformed `rustc_layout_scalar_valid_range_start` attribute input 
4747struct  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)]
202202 | | expected an integer literal here
203203 | help: must be of the form: `#[rustc_layout_scalar_valid_range_start(start)]`
204204
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
206221
207222For more information about this error, try `rustc --explain E0539`.
                         You can’t perform that action at this time. 
           
                  
0 commit comments