-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an AST
Description
The following code:
pub fn f(
/// Comment
id: u8)
{}
Results in the following error:
error: expected pattern, found `/// Comment`
--> src/lib.rs:2:5
|
2 | /// Comment
| ^^^^^^^^^^^ expected pattern
At best, the error is confusing. Ideally it should not be an error, but if doc comments are not allowed in a parameter list, the error should be clearer.
Metadata
Metadata
Assignees
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an AST