Adjust parser generic parameter errors
This commit is contained in:
parent
899d013fef
commit
bbdcc4e7ce
18 changed files with 93 additions and 54 deletions
|
|
@ -1,5 +1,3 @@
|
|||
// ignore-tidy-linelength
|
||||
|
||||
// We need all these 9 issue-20616-N.rs files
|
||||
// because we can only catch one parsing error at a time
|
||||
|
||||
|
|
@ -12,7 +10,8 @@ type Type_1_<'a, T> = &'a T;
|
|||
//type Type_2 = Type_1_<'static ()>; // error: expected `,` or `>` after lifetime name, found `(`
|
||||
|
||||
|
||||
type Type_3<T> = Box<T,,>; //~ error: expected one of `>`, const, identifier, lifetime, or type, found `,`
|
||||
type Type_3<T> = Box<T,,>;
|
||||
//~^ error: expected one of `>`, const, identifier, lifetime, or type, found `,`
|
||||
|
||||
|
||||
//type Type_4<T> = Type_1_<'static,, T>; // error: expected type, found `,`
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
error: expected one of `>`, const, identifier, lifetime, or type, found `,`
|
||||
--> $DIR/issue-20616-3.rs:15:24
|
||||
--> $DIR/issue-20616-3.rs:13:24
|
||||
|
|
||||
LL | type Type_3<T> = Box<T,,>; //~ error: expected one of `>`, const, identifier, lifetime, or type, found `,`
|
||||
LL | type Type_3<T> = Box<T,,>;
|
||||
| ^ expected one of `>`, const, identifier, lifetime, or type here
|
||||
|
||||
error: aborting due to previous error
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
// ignore-tidy-linelength
|
||||
|
||||
// We need all these 9 issue-20616-N.rs files
|
||||
// because we can only catch one parsing error at a time
|
||||
|
||||
|
|
@ -27,7 +25,8 @@ type Type_5_<'a> = Type_1_<'a, ()>;
|
|||
//type Type_6 = Type_5_<'a,,>; // error: expected type, found `,`
|
||||
|
||||
|
||||
type Type_7 = Box<(),,>; //~ error: expected one of `>`, const, identifier, lifetime, or type, found `,`
|
||||
type Type_7 = Box<(),,>;
|
||||
//~^ error: expected one of `>`, const, identifier, lifetime, or type, found `,`
|
||||
|
||||
|
||||
//type Type_8<'a,,> = &'a (); // error: expected ident, found `,`
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
error: expected one of `>`, const, identifier, lifetime, or type, found `,`
|
||||
--> $DIR/issue-20616-7.rs:30:22
|
||||
--> $DIR/issue-20616-7.rs:28:22
|
||||
|
|
||||
LL | type Type_7 = Box<(),,>; //~ error: expected one of `>`, const, identifier, lifetime, or type, found `,`
|
||||
LL | type Type_7 = Box<(),,>;
|
||||
| ^ expected one of `>`, const, identifier, lifetime, or type here
|
||||
|
||||
error: aborting due to previous error
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
// ignore-tidy-linelength
|
||||
|
||||
// We need all these 9 issue-20616-N.rs files
|
||||
// because we can only catch one parsing error at a time
|
||||
|
||||
|
|
@ -30,7 +28,8 @@ type Type_5_<'a> = Type_1_<'a, ()>;
|
|||
//type Type_7 = Box<(),,>; // error: expected type, found `,`
|
||||
|
||||
|
||||
type Type_8<'a,,> = &'a (); //~ error: expected one of `>`, `const`, identifier, or lifetime, found `,`
|
||||
type Type_8<'a,,> = &'a ();
|
||||
//~^ error: expected one of `>`, `const`, identifier, or lifetime, found `,`
|
||||
|
||||
|
||||
//type Type_9<T,,> = Box<T>; // error: expected identifier, found `,`
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
error: expected one of `>`, `const`, identifier, or lifetime, found `,`
|
||||
--> $DIR/issue-20616-8.rs:33:16
|
||||
--> $DIR/issue-20616-8.rs:31:16
|
||||
|
|
||||
LL | type Type_8<'a,,> = &'a (); //~ error: expected one of `>`, `const`, identifier, or lifetime, found `,`
|
||||
LL | type Type_8<'a,,> = &'a ();
|
||||
| ^ expected one of `>`, `const`, identifier, or lifetime here
|
||||
|
||||
error: aborting due to previous error
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
// ignore-tidy-linelength
|
||||
|
||||
// We need all these 9 issue-20616-N.rs files
|
||||
// because we can only catch one parsing error at a time
|
||||
|
||||
|
|
@ -33,4 +31,5 @@ type Type_5_<'a> = Type_1_<'a, ()>;
|
|||
//type Type_8<'a,,> = &'a (); // error: expected identifier, found `,`
|
||||
|
||||
|
||||
type Type_9<T,,> = Box<T>; //~ error: expected one of `>`, `const`, identifier, or lifetime, found `,`
|
||||
type Type_9<T,,> = Box<T>;
|
||||
//~^ error: expected one of `>`, `const`, identifier, or lifetime, found `,`
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
error: expected one of `>`, `const`, identifier, or lifetime, found `,`
|
||||
--> $DIR/issue-20616-9.rs:36:15
|
||||
--> $DIR/issue-20616-9.rs:34:15
|
||||
|
|
||||
LL | type Type_9<T,,> = Box<T>; //~ error: expected one of `>`, `const`, identifier, or lifetime, found `,`
|
||||
LL | type Type_9<T,,> = Box<T>;
|
||||
| ^ expected one of `>`, `const`, identifier, or lifetime here
|
||||
|
||||
error: aborting due to previous error
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue