error[E0605]: non-primitive cast: `E` as `isize`
--> $DIR/uninhabited-enum-cast.rs:4:20
|
-LL | println!("{}", (e as isize).to_string()); //~ ERROR non-primitive cast
- | ^^^^^^^^^^^^
- |
- = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait
+LL | println!("{}", (e as isize).to_string());
+ | ^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
error: aborting due to previous error