This repository has been archived by the owner on Apr 8, 2024. It is now read-only.
Handle IDENT restrictions #39
Labels
ambiguity
Potential sources of ambiguity
grammar
Issues with the definition of the rust grammar
lexer
Issues with the lexer
restrictions
Issues related to the permissiveness of the grammar
Currently the grammar allows restricted identifiers in
IDENT
. However, libsyntax does not.parse_ident_common
The following are examples rejected by libsyntax:
The restriction should include all strong and reserved keywords, and
_
._
is special, it is allowed in a few places:const
itemconst _: i32 = 0;
extern crate
as
aliasextern crate c as _;
use
aliasesuse x as _;
extern
block function parameter namesextern { fn f(_: i32); }
fn(_: i32)
self
is allowed forextern crate self as foo;
Paths allow several keywords:
super
,self
,Self
, andcrate
.The text was updated successfully, but these errors were encountered: