File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 33#![ cfg_attr( full, feature( adt_const_params) ) ]
44#![ cfg_attr( full, allow( incomplete_features) ) ]
55
6- struct Foo < const N : [ u8 ; { //[min]~ ERROR `[u8; _]` is forbidden
6+ struct Foo < const N : [ u8 ; {
77 struct Foo < const N : usize > ;
88
99 impl < const N : usize > Foo < N > {
@@ -15,5 +15,9 @@ struct Foo<const N: [u8; { //[min]~ ERROR `[u8; _]` is forbidden
1515 Foo :: < 17 > :: value ( )
1616 //~^ ERROR cannot call non-const fn
1717} ] > ;
18+ //[min]~^^^^^^^^^^^^ ERROR `[u8; {
19+
20+ // N.B. it is important that the comment above is not inside the array length,
21+ // otherwise it may check for itself, instead of the actual error
1822
1923fn main ( ) { }
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ fn main() {
1717 let _ = format ! ( "}" ) ;
1818 //~^ ERROR invalid format string: unmatched `}` found
1919 let _ = format ! ( "{\\ }" ) ;
20- //~^ ERROR invalid format string: expected `'}'`, found `'\\ '`
20+ //~^ ERROR invalid format string: expected `'}'`, found `'\'`
2121 let _ = format ! ( "\n \n \n {\n \n \n " ) ;
2222 //~^ ERROR invalid format string
2323 let _ = format ! ( r###"
Original file line number Diff line number Diff line change 11"\u\\ "
22//~^ ERROR incorrect unicode escape sequence
33//~| ERROR invalid trailing slash in literal
4- //~| ERROR expected item, found `"\u\\ "`
4+ //~| ERROR expected item, found `"\u\"`
You can’t perform that action at this time.
0 commit comments