diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2025-06-06 19:39:48 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2025-06-06 19:53:12 +0000 |
| commit | 24dcfaf71ffe08a0b5acfcc5b5b4d2419e79b847 (patch) | |
| tree | 530b96a7a6e54d7803a91c01d02749a6afeeb753 /compiler/rustc_codegen_llvm/src/attributes.rs | |
| parent | df8102fe5f24f28a918660b0cd918d7331c3896e (diff) | |
| download | rust-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_llvm/src/attributes.rs')
0 files changed, 0 insertions, 0 deletions
