Closed
Description
Code
The simplest reproduction would be something like this:
fn main() {
if 5 =< 3 {
println("True!");
}
}
Current output
error: expected type, found `3`
--> src/main.rs:2:13
|
2 | if 5 =< 3 {
| ^ expected type
Desired output
error: expected type, found `3`
--> src/main.rs:2:13
|
2 | if 5 =< 3 {
| ^ expected type
Note: If you want to compare for less or equal instead, use `<=`
- the `note points at the operator
Rationale and extra context
A new user might get confused about needing a type, as the error points at the number instead of the comparator.
Other cases
No response
Anything else?
No response