]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/mismatched_types/cast-rfc0401.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / mismatched_types / cast-rfc0401.stderr
index 84220ea172a11547c5c54cdc3ab99523b67d4e7d..e63ca6e11de59f31bcdb5f33f0b14f4836efb691 100644 (file)
@@ -30,7 +30,7 @@ help: consider borrowing the value
    |
 LL -     let _ = v as &u8;
 LL +     let _ = &*v;
-   | 
+   |
 
 error[E0605]: non-primitive cast: `*const u8` as `E`
   --> $DIR/cast-rfc0401.rs:30:13
@@ -97,14 +97,11 @@ LL |     let _ = E::A as bool;
 error[E0604]: only `u8` can be cast as `char`, not `u32`
   --> $DIR/cast-rfc0401.rs:41:13
    |
-LL |     let _ = 0x61u32 as char;
-   |             ^^^^^^^^^^^^^^^ invalid cast
-   |
-help: try `char::from_u32` instead
-  --> $DIR/cast-rfc0401.rs:41:13
-   |
 LL |     let _ = 0x61u32 as char;
    |             ^^^^^^^^^^^^^^^
+   |             |
+   |             invalid cast
+   |             help: try `char::from_u32` instead: `char::from_u32(0x61u32)`
 
 error[E0606]: casting `bool` as `f32` is invalid
   --> $DIR/cast-rfc0401.rs:43:13