File tree 3 files changed +7
-3
lines changed
3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 3
3
#![ cfg_attr( full, feature( adt_const_params) ) ]
4
4
#![ cfg_attr( full, allow( incomplete_features) ) ]
5
5
6
- struct Foo < const N : [ u8 ; { //[min]~ ERROR `[u8; _]` is forbidden
6
+ struct Foo < const N : [ u8 ; {
7
7
struct Foo < const N : usize > ;
8
8
9
9
impl < const N : usize > Foo < N > {
@@ -15,5 +15,9 @@ struct Foo<const N: [u8; { //[min]~ ERROR `[u8; _]` is forbidden
15
15
Foo :: < 17 > :: value ( )
16
16
//~^ ERROR cannot call non-const fn
17
17
} ] > ;
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
18
22
19
23
fn main ( ) { }
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ fn main() {
17
17
let _ = format ! ( "}" ) ;
18
18
//~^ ERROR invalid format string: unmatched `}` found
19
19
let _ = format ! ( "{\\ }" ) ;
20
- //~^ ERROR invalid format string: expected `'}'`, found `'\\ '`
20
+ //~^ ERROR invalid format string: expected `'}'`, found `'\'`
21
21
let _ = format ! ( "\n \n \n {\n \n \n " ) ;
22
22
//~^ ERROR invalid format string
23
23
let _ = format ! ( r###"
Original file line number Diff line number Diff line change 1
1
"\u\\ "
2
2
//~^ ERROR incorrect unicode escape sequence
3
3
//~| 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