-
Couldn't load subscription status.
- Fork 13.9k
Closed
Labels
A-grammarArea: The grammar of RustArea: The grammar of RustA-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTT-langRelevant to the language teamRelevant to the language team
Description
I found these pathlogical examples pass the lexer and the parser:
fn main() {
println!("{}", "Foo"_);
println!("{}", 10._);
}The reason is that
scan_optional_raw_nameeats_, but reports no suffix.scan_numberdistinguishes between decimal points and field/method syntax byis_xid_start, which in fact excludes_.
According to the reference, it seems these examples shouldn't be allowed.
Tested on stable (rustc 1.17.0 (56124baa9 2017-04-24)) and nightly (rustc 1.19.0-nightly (6a5fc9eec 2017-05-02)) on the playground.
Metadata
Metadata
Assignees
Labels
A-grammarArea: The grammar of RustArea: The grammar of RustA-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTT-langRelevant to the language teamRelevant to the language team