]> git.lizzy.rs Git - rust.git/blob - src/test/ui/coercion/coerce-to-bang-cast.stderr
Rollup merge of #99064 - lyming2007:issue-97687-fix, r=estebank
[rust.git] / src / test / ui / coercion / coerce-to-bang-cast.stderr
1 error[E0605]: non-primitive cast: `i32` as `!`
2   --> $DIR/coerce-to-bang-cast.rs:4:13
3    |
4 LL |     let y = {return; 22} as !;
5    |             ^^^^^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
6
7 error[E0605]: non-primitive cast: `i32` as `!`
8   --> $DIR/coerce-to-bang-cast.rs:9:13
9    |
10 LL |     let y = 22 as !;
11    |             ^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
12
13 error: aborting due to 2 previous errors
14
15 For more information about this error, try `rustc --explain E0605`.