syntax: Extra diagnostics for _ used in an identifier position
This commit is contained in:
parent
102a5be712
commit
1cbdf4e7d3
7 changed files with 34 additions and 19 deletions
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
// compile-flags: --cfg ""
|
||||
|
||||
// error-pattern: expected ident, found
|
||||
// error-pattern: expected identifier, found
|
||||
|
||||
pub fn main() {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ type Type_5_<'a> = Type_1_<'a, ()>;
|
|||
//type Type_7 = Box<(),,>; // error: expected type, found `,`
|
||||
|
||||
|
||||
type Type_8<'a,,> = &'a (); //~ error: expected ident, found `,`
|
||||
type Type_8<'a,,> = &'a (); //~ error: expected identifier, found `,`
|
||||
|
||||
|
||||
//type Type_9<T,,> = Box<T>; // error: expected ident, found `,`
|
||||
//type Type_9<T,,> = Box<T>; // error: expected identifier, found `,`
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ type Type_5_<'a> = Type_1_<'a, ()>;
|
|||
//type Type_7 = Box<(),,>; // error: expected type, found `,`
|
||||
|
||||
|
||||
//type Type_8<'a,,> = &'a (); // error: expected ident, found `,`
|
||||
//type Type_8<'a,,> = &'a (); // error: expected identifier, found `,`
|
||||
|
||||
|
||||
type Type_9<T,,> = Box<T>; //~ error: expected ident, found `,`
|
||||
type Type_9<T,,> = Box<T>; //~ error: expected identifier, found `,`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue