]>
Commit | Line | Data |
---|---|---|
ff7c6d11 | 1 | error[E0054]: cannot cast as `bool` |
0731742a | 2 | --> $DIR/cast-as-bool.rs:2:13 |
ff7c6d11 | 3 | | |
532ac7d7 | 4 | LL | let u = 5 as bool; |
0731742a XL |
5 | | ^^^^^^^^^ help: compare with zero instead: `5 != 0` |
6 | ||
7 | error[E0054]: cannot cast as `bool` | |
8 | --> $DIR/cast-as-bool.rs:5:13 | |
9 | | | |
532ac7d7 | 10 | LL | let t = (1 + 2) as bool; |
0731742a XL |
11 | | ^^^^^^^^^^^^^^^ help: compare with zero instead: `(1 + 2) != 0` |
12 | ||
13 | error[E0054]: cannot cast as `bool` | |
14 | --> $DIR/cast-as-bool.rs:8:13 | |
ff7c6d11 | 15 | | |
532ac7d7 | 16 | LL | let v = "hello" as bool; |
0731742a | 17 | | ^^^^^^^^^^^^^^^ unsupported cast |
ff7c6d11 | 18 | |
0731742a | 19 | error: aborting due to 3 previous errors |
ff7c6d11 | 20 | |
0531ce1d | 21 | For more information about this error, try `rustc --explain E0054`. |