wording improvement
This commit is contained in:
parent
7b8c6a2d30
commit
deb1eb6134
17 changed files with 35 additions and 38 deletions
|
|
@ -20,7 +20,7 @@ error[E0609]: no field `f` on type `fn() {main}`
|
|||
75 | let _ = main.f as *const u32;
|
||||
| ^
|
||||
|
||||
error[E0605]: non-scalar cast: `*const u8` as `&u8`
|
||||
error[E0605]: non-primitive cast: `*const u8` as `&u8`
|
||||
--> $DIR/cast-rfc0401.rs:39:13
|
||||
|
|
||||
39 | let _ = v as &u8;
|
||||
|
|
@ -28,7 +28,7 @@ error[E0605]: non-scalar cast: `*const u8` as `&u8`
|
|||
|
|
||||
= note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait
|
||||
|
||||
error[E0605]: non-scalar cast: `*const u8` as `E`
|
||||
error[E0605]: non-primitive cast: `*const u8` as `E`
|
||||
--> $DIR/cast-rfc0401.rs:40:13
|
||||
|
|
||||
40 | let _ = v as E;
|
||||
|
|
@ -36,7 +36,7 @@ error[E0605]: non-scalar cast: `*const u8` as `E`
|
|||
|
|
||||
= note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait
|
||||
|
||||
error[E0605]: non-scalar cast: `*const u8` as `fn()`
|
||||
error[E0605]: non-primitive cast: `*const u8` as `fn()`
|
||||
--> $DIR/cast-rfc0401.rs:41:13
|
||||
|
|
||||
41 | let _ = v as fn();
|
||||
|
|
@ -44,7 +44,7 @@ error[E0605]: non-scalar cast: `*const u8` as `fn()`
|
|||
|
|
||||
= note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait
|
||||
|
||||
error[E0605]: non-scalar cast: `*const u8` as `(u32,)`
|
||||
error[E0605]: non-primitive cast: `*const u8` as `(u32,)`
|
||||
--> $DIR/cast-rfc0401.rs:42:13
|
||||
|
|
||||
42 | let _ = v as (u32,);
|
||||
|
|
@ -52,7 +52,7 @@ error[E0605]: non-scalar cast: `*const u8` as `(u32,)`
|
|||
|
|
||||
= note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait
|
||||
|
||||
error[E0605]: non-scalar cast: `std::option::Option<&*const u8>` as `*const u8`
|
||||
error[E0605]: non-primitive cast: `std::option::Option<&*const u8>` as `*const u8`
|
||||
--> $DIR/cast-rfc0401.rs:43:13
|
||||
|
|
||||
43 | let _ = Some(&v) as *const u8;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ error[E0308]: mismatched types
|
|||
37 | write!(hello);
|
||||
| -------------- in this macro invocation
|
||||
|
||||
error[E0605]: non-scalar cast: `{integer}` as `()`
|
||||
error[E0605]: non-primitive cast: `{integer}` as `()`
|
||||
--> $DIR/issue-26480.rs:32:19
|
||||
|
|
||||
32 | ($x:expr) => ($x as ())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue