1 error[E0054]: cannot cast as `bool`
2 --> $DIR/cast-as-bool.rs:2:13
4 LL | let u = 5 as bool;
5 | ^^^^^^^^^ help: compare with zero instead: `5 != 0`
7 error[E0054]: cannot cast as `bool`
8 --> $DIR/cast-as-bool.rs:5:13
10 LL | let t = (1 + 2) as bool;
11 | ^^^^^^^^^^^^^^^ help: compare with zero instead: `(1 + 2) != 0`
13 error[E0606]: casting `&'static str` as `bool` is invalid
14 --> $DIR/cast-as-bool.rs:8:13
16 LL | let v = "hello" as bool;
19 error: aborting due to 3 previous errors
21 Some errors have detailed explanations: E0054, E0606.
22 For more information about an error, try `rustc --explain E0054`.