fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

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