2018-12-16 21:21:47 -06:00
|
|
|
error[E0605]: non-primitive cast: `Foo` as `isize`
|
2018-08-08 07:28:26 -05:00
|
|
|
--> $DIR/nonscalar-cast.rs:17:20
|
|
|
|
|
|
2018-12-16 21:21:47 -06:00
|
|
|
LL | println!("{}", Foo { x: 1 } as isize); //~ non-primitive cast: `Foo` as `isize` [E0605]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
= note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0605`.
|