-
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 lintsT-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
Code
fn main(){
let x = 42;
match x{
0..=73 => {}
74..=> {},
}
}
Current output
error[E0586]: inclusive range with no end
--> src/main.rs:5:11
|
5 | 74..=> {},
| ^^^ help: use `..` instead
|
= note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
error: expected one of `=>`, `if`, or `|`, found `>`
--> src/main.rs:5:14
|
5 | 74..=> {},
| ^ expected one of `=>`, `if`, or `|`
For more information about this error, try `rustc --explain E0586`.
error: could not compile `playground` due to 2 previous errors
Desired output
It should suggest inserting a space:
- 74..=> {},
+ 74.. => {},
Rationale and extra context
No response
Other cases
No response
Anything else?
No response
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-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.