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