]> git.lizzy.rs Git - rust.git/blob - src/test/ui/coercion/coerce-to-bang-cast.stderr
ff30ebc09c63acf5b43aee6dadee8f8c63160660
[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:6:13
3    |
4 LL |     let y = {return; 22} as !;
5    |             ^^^^^^^^^^^^^^^^^
6    |
7    = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait
8
9 error[E0605]: non-primitive cast: `i32` as `!`
10   --> $DIR/coerce-to-bang-cast.rs:11:13
11    |
12 LL |     let y = 22 as !;
13    |             ^^^^^^^
14    |
15    = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait
16
17 error: aborting due to 2 previous errors
18
19 For more information about this error, try `rustc --explain E0605`.