-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Closed
Labels
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 ASTC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
The code
fn main() {
let x = 0;
let y = x.max(1) //!foo
.min(2);
}I get this error:
error: expected one of `.`, `;`, `?`, or an operator, found `//!foo`
--> src/main.rs:3:22
|
3 | let y = x.max(1) //!foo
| ^^^^^^ expected one of `.`, `;`, `?`, or an operator hereProbably something like:
error: expected outer doc comment
--> src/main.rs:3:16
|
3 | let y = x; //!foo
| ^^^^^^
|
= note: inner doc comments like this (starting with `//!` or `/*!`) can only appear before itemsis more helpful because at least you can understand what's wrong (especially when you don't know inner doc comments).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
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 ASTC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.