|
|
|
|
|
by estebank
2551 days ago
|
|
I'm intrigued at what your opinion is about the following Rust errors: error[E0308]: mismatched types
--> src/main.rs:4:8
|
4 | if x = y { println!("eq") }
| ^^^^^
| |
| expected bool, found ()
| help: try comparing for equality: `x == y`
|
= note: expected type `bool`
found type `()`
error: `<` is interpreted as a start of generic arguments for `u32`, not a comparison
--> src/main.rs:4:17
|
4 | if i as u32 < 2 {
| -------- ^ --- interpreted as generic arguments
| | |
| | not interpreted as comparison
| help: try comparing the cast value: `(i as u32)`
|
|