syntax: Extra diagnostics for _ used in an identifier position

This commit is contained in:
Vadim Petrochenkov 2016-03-31 10:15:36 +03:00
parent 102a5be712
commit 1cbdf4e7d3
7 changed files with 34 additions and 19 deletions

View file

@ -12,7 +12,7 @@
// compile-flags: --cfg ""
// error-pattern: expected ident, found
// error-pattern: expected identifier, found
pub fn main() {
}

View file

@ -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 `,`

View file

@ -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 `,`