]> git.proxmox.com Git - rustc.git/blob - tests/ui/reachable/expr_cast.stderr
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / reachable / expr_cast.stderr
1 error: unreachable expression
2 --> $DIR/expr_cast.rs:9:13
3 |
4 LL | let x = {return} as !;
5 | ^------^^^^^^
6 | ||
7 | |any code following this expression is unreachable
8 | unreachable expression
9 |
10 note: the lint level is defined here
11 --> $DIR/expr_cast.rs:4:9
12 |
13 LL | #![deny(unreachable_code)]
14 | ^^^^^^^^^^^^^^^^
15
16 error[E0605]: non-primitive cast: `()` as `!`
17 --> $DIR/expr_cast.rs:9:13
18 |
19 LL | let x = {return} as !;
20 | ^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
21
22 error: aborting due to 2 previous errors
23
24 For more information about this error, try `rustc --explain E0605`.