]> 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 a39af7832f8c959600b5726f2b91f0a920157289..a9f10dfec994a9e4c7a71ca776e2fca44abb058f 100644 (file)
@@ -2,9 +2,7 @@ error[E0605]: non-primitive cast: `E` as `isize`
   --> $DIR/uninhabited-enum-cast.rs:4:20
    |
 LL |     println!("{}", (e as isize).to_string());
-   |                    ^^^^^^^^^^^^
-   |
-   = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait
+   |                    ^^^^^^^^^^^^ 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