-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-frontendArea: Compiler frontend (errors, parsing and HIR)Area: Compiler frontend (errors, parsing and HIR)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
Description
trait_comments.rs
trait A {
fn a(); /// doc comment
}
fn main() {}
error:
$ rustc trait_comments.rs
trait_comments.rs:3:0: 3:1 error: unexpected token: `}`
trait_comments.rs:3 }
It seems to only be triple slashes that cause it - // comment
compiles fine.
Edit: Interestingly it seems that this compiles fine:
trait A {
fn a(); /// comment
fn b(); // comment
}
fn main() {}
Metadata
Metadata
Assignees
Labels
A-frontendArea: Compiler frontend (errors, parsing and HIR)Area: Compiler frontend (errors, parsing and HIR)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