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