-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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 AST
Milestone
Description
fn main() {
struct::foo();
mut::baz();
}
<anon>:2:5: 2:16 error: failed to resolve. Use of undeclared module `struct`
<anon>:2 struct::foo();
^~~~~~~~~~~
<anon>:2:5: 2:16 error: unresolved name `struct::foo`.
<anon>:2 struct::foo();
^~~~~~~~~~~
<anon>:3:5: 3:13 error: failed to resolve. Use of undeclared module `mut`
<anon>:3 mut::baz();
^~~~~~~~
<anon>:3:5: 3:13 error: unresolved name `mut::baz`.
<anon>:3 mut::baz();
^~~~~~~~
Due to the false
s:
rust/src/libsyntax/parse/parser.rs
Line 579 in e6a3dab
token::IDENT(sid, false) if kw.to_name() == sid.name => { rust/src/libsyntax/parse/token.rs
Line 704 in e6a3dab
token::IDENT(sid, false) => { kw.to_name() == sid.name } rust/src/libsyntax/parse/token.rs
Line 711 in e6a3dab
token::IDENT(sid, false) => {
(etc.)
Adding a space, e.g. struct ::foo()
causes errors like expected ident, found
::``, while a normal module path can freely have spaces.
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 AST