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#91597 - r00ster91:lessthangreaterthan, r=ol…
…i-obk Recover on invalid operators `<>` and `<=>` Thanks to rust-lang#89871 for showing me how to do this. Next, I think it'd be nice to recover on `<=>` too, like rust-lang#89871 intended, if this even works.
- Loading branch information
Showing
5 changed files
with
57 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
fn main() { | ||
println!("{}", 1 <> 2); | ||
//~^ERROR invalid comparison operator `<>` | ||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
error: invalid comparison operator `<>` | ||
--> $DIR/less-than-greater-than.rs:2:22 | ||
| | ||
LL | println!("{}", 1 <> 2); | ||
| ^^ help: `<>` is not a valid comparison operator, use `!=` | ||
|
||
error: aborting due to previous error | ||
|
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
fn main() { | ||
println!("{}", 1 <=> 2); | ||
//~^ERROR invalid comparison operator `<=>` | ||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
error: invalid comparison operator `<=>` | ||
--> $DIR/spaceship.rs:2:22 | ||
| | ||
LL | println!("{}", 1 <=> 2); | ||
| ^^^ `<=>` is not a valid comparison operator, use `std::cmp::Ordering` | ||
|
||
error: aborting due to previous error | ||
|