Closed
Description
Code
fn main() {
let v = "hello" as bool;
}
Current output
error[E0606]: casting `&'static str` as `bool` is invalid
--> src/lib.rs:2:13
|
2 | let v = "hello" as bool;
| ^^^^^^^^^^^^^^^
For more information about this error, try `rustc --explain E0606`.
Desired output
error[E0606]: casting `&'static str` as `bool` is invalid
--> src/lib.rs:2:13
|
2 | let v = "hello" as bool;
| ^^^^^^^^^^^^^^^
help: to find out if a &str or String contains something or not, use: `!"hello".is_empty()`
For more information about this error, try `rustc --explain E0606`.
Rationale and extra context
No response
Other cases
No response
Anything else?
No response