about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc/src
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2025-06-06 19:39:48 +0000
committerEsteban Küber <esteban@kuber.com.ar>2025-06-06 19:53:12 +0000
commit24dcfaf71ffe08a0b5acfcc5b5b4d2419e79b847 (patch)
tree530b96a7a6e54d7803a91c01d02749a6afeeb753 /compiler/rustc_codegen_gcc/src
parentdf8102fe5f24f28a918660b0cd918d7331c3896e (diff)
downloadrust-24dcfaf71ffe08a0b5acfcc5b5b4d2419e79b847.tar.gz
rust-24dcfaf71ffe08a0b5acfcc5b5b4d2419e79b847.zip
Make cast suggestions verbose
```
error[E0604]: only `u8` can be cast as `char`, not `u32`
  --> $DIR/E0604.rs:2:5
   |
LL |     1u32 as char;
   |     ^^^^^^^^^^^^ invalid cast
   |
help: try `char::from_u32` instead
   |
LL -     1u32 as char;
LL +     char::from_u32(1u32);
   |
```

```
error[E0620]: cast to unsized type: `&[u8]` as `[char]`
  --> $DIR/cast-to-slice.rs:6:5
   |
LL |     arr as [char];
   |     ^^^^^^^^^^^^^
   |
help: try casting to a reference instead
   |
LL |     arr as &[char];
   |            +
```

```
error[E0620]: cast to unsized type: `Box<{integer}>` as `dyn Send`
  --> $DIR/cast-to-unsized-trait-object-suggestion.rs:3:5
   |
LL |     Box::new(1) as dyn Send;
   |     ^^^^^^^^^^^^^^^^^^^^^^^
   |
help: you can cast to a `Box` instead
   |
LL |     Box::new(1) as Box<dyn Send>;
   |                    ++++        +
```
Diffstat (limited to 'compiler/rustc_codegen_gcc/src')
0 files changed, 0 insertions, 0 deletions