rust/src/test/ui/nonscalar-cast.stderr

12 lines
462 B
Plaintext
Raw Normal View History

error[E0605]: non-primitive cast: `Foo` as `isize`
2018-08-08 07:28:26 -05:00
--> $DIR/nonscalar-cast.rs:17:20
|
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`.