vis: Visibility,
attrs: Vec<Attribute>,
) -> PResult<'a, StructField> {
- let name = self.parse_ident()?;
+ let name = self.parse_ident_common(false)?;
self.expect(&token::Colon)?;
let ty = self.parse_ty()?;
Ok(StructField {
foo: T,
trait T { //~ ERROR expected identifier, found keyword `trait`
-//~^ ERROR expected `:`, found `T`
fn foo(&self);
}
error: this file contains an unclosed delimiter
- --> $DIR/missing-close-brace-in-struct.rs:14:65
+ --> $DIR/missing-close-brace-in-struct.rs:13:65
|
LL | pub(crate) struct Bar<T> {
| - unclosed delimiter
LL | trait T {
| ^^^^^ expected identifier, found keyword
-error: expected `:`, found `T`
- --> $DIR/missing-close-brace-in-struct.rs:4:7
- |
-LL | trait T {
- | ^ expected `:`
-
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
struct S {
let foo: (),
//~^ ERROR expected identifier, found keyword `let`
- //~^^ ERROR expected `:`, found `foo`
}
fn main() {}
LL | let foo: (),
| ^^^ expected identifier, found keyword
-error: expected `:`, found `foo`
- --> $DIR/removed-syntax-field-let.rs:2:9
- |
-LL | let foo: (),
- | ^^^ expected `:`
-
-error: aborting due to 2 previous errors
+error: aborting due to previous error