-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.D-newcomer-roadblockDiagnostics: Confusing error or lint; hard to understand for new users.Diagnostics: Confusing error or lint; hard to understand for new users.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
Given the following code: [playground link]
fn main() {
println!("{:?}", 0 ..== 1)
}
The current output is:
Compiling playground v0.0.1 (/playground)
error[E0586]: inclusive range with no end
--> src/main.rs:2:24
|
2 | println!("{:?}", 0 ..== 1)
| ^^^ help: use `..` instead
|
= note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
error: expected `,`, found `=`
--> src/main.rs:2:27
|
2 | println!("{:?}", 0 ..== 1)
| ^ expected `,`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0586`.
error: could not compile `playground`
To learn more, run the command again with --verbose.
Ideally the output should look like:
Compiling playground v0.0.1 (/playground)
error[E0XXXX]: inclusive range typo
--> src/main.rs:2:24
|
2 | println!("{:?}", 0 ..== 1)
| ^^^^ help: use `..=` instead
|
= note: inclusive ranges end with a single equals sign (`..=`)
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.D-newcomer-roadblockDiagnostics: Confusing error or lint; hard to understand for new users.Diagnostics: Confusing error or lint; hard to understand for new users.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.