]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/issues/issue-2995.stderr
Tweak "non-primitive cast" error
[rust.git] / src / test / ui / issues / issue-2995.stderr
index c316780d5f6a5c972bed74f0a84254b6dbeea847..9f5968399a37d8a730bced19a959071fba7e0bf9 100644 (file)
@@ -2,9 +2,7 @@ error[E0605]: non-primitive cast: `*const isize` as `&isize`
   --> $DIR/issue-2995.rs:2:22
    |
 LL |     let _q: &isize = p as &isize;
-   |                      ^^^^^^^^^^^
-   |
-   = 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