forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#63475 - iluuu1994:issue-62632, r=Centril
Bring back suggestion for splitting `<-` into `< -` Closes rust-lang#62632
- Loading branch information
Showing
6 changed files
with
33 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
fn main() { | ||
let x = -5; | ||
if x<-1 { //~ ERROR expected `{`, found `<-` | ||
if x<-1 { //~ ERROR unexpected token: `<-` | ||
println!("ok"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
error: expected `{`, found `<-` | ||
error: unexpected token: `<-` | ||
--> $DIR/placement-syntax.rs:3:9 | ||
| | ||
LL | if x<-1 { | ||
| -- ^^ expected `{` | ||
| | | ||
| this `if` statement has a condition, but no block | ||
| ^^ | ||
help: if you meant to write a comparison against a negative value, add a space in between `<` and `-` | ||
| | ||
LL | if x< -1 { | ||
| ^^^ | ||
|
||
error: aborting due to previous error | ||
|