We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c8bbba9 + 9deeaef commit 98eb5f7Copy full SHA for 98eb5f7
src/libsyntax/parse/parser.rs
@@ -3118,8 +3118,9 @@ impl<'a> Parser<'a> {
3118
self.span_fatal(last_span,
3119
"expected identifier, found path");
3120
}
3121
- // why a path here, and not just an identifier?
3122
- let name = codemap::Spanned{span: self.last_span, node: self.parse_ident()};
+ let ident = self.parse_ident();
+ let last_span = self.last_span;
3123
+ let name = codemap::Spanned{span: last_span, node: ident};
3124
let sub = if self.eat(&token::AT) {
3125
Some(self.parse_pat())
3126
} else {
0 commit comments