]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/uninhabited/uninhabited-enum-cast.stderr
Tweak "non-primitive cast" error
[rust.git] / src / test / ui / uninhabited / uninhabited-enum-cast.stderr
index 36dab0c43eb7693e2c45d521d3250923cadbcbf7..a9f10dfec994a9e4c7a71ca776e2fca44abb058f 100644 (file)
@@ -1,10 +1,8 @@
 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