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

12 lines
461 B
Text
Raw Normal View History

error[E0605]: non-primitive cast: `Foo` as `isize`
2018-12-25 08:56:47 -07:00
--> $DIR/nonscalar-cast.rs:7:20
2018-08-08 14:28:26 +02:00
|
LL | println!("{}", Foo { x: 1 } as isize); //~ non-primitive cast: `Foo` as `isize` [E0605]
| ^^^^^^^^^^^^^^^^^^^^^
2018-08-08 14:28:26 +02: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`.