1error: unreachable expression
2  --> $DIR/expr_cast.rs:9:13
3   |
4LL |     let x = {return} as !;
5   |             ^------^^^^^^
6   |             ||
7   |             |any code following this expression is unreachable
8   |             unreachable expression
9   |
10note: the lint level is defined here
11  --> $DIR/expr_cast.rs:4:9
12   |
13LL | #![deny(unreachable_code)]
14   |         ^^^^^^^^^^^^^^^^
15
16error[E0605]: non-primitive cast: `()` as `!`
17  --> $DIR/expr_cast.rs:9:13
18   |
19LL |     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
22error: aborting due to 2 previous errors
23
24For more information about this error, try `rustc --explain E0605`.
25