about summary refs log tree commit diff
path: root/tests/ui/default-method-parsing.rs
diff options
context:
space:
mode:
authorJacob Pratt <jacob@jhpratt.dev>2025-06-07 07:05:48 +0200
committerGitHub <noreply@github.com>2025-06-07 07:05:48 +0200
commitfb6977c126bfab3547d08712fc9d612abb82668e (patch)
treed4ffd8fb27ec8bce49655375b4074e1fb490dcd1 /tests/ui/default-method-parsing.rs
parent6b4abb91804d5fd37b98d601682abbc42af96976 (diff)
parent3c049e21ca75134b7cab84507c93c18ce38ff275 (diff)
downloadrust-fb6977c126bfab3547d08712fc9d612abb82668e.tar.gz
rust-fb6977c126bfab3547d08712fc9d612abb82668e.zip
Rollup merge of #142131 - estebank:cast-sugg, r=Urgau
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>;
   |                    ++++        +
```

Part of rust-lang/rust#141973.
Diffstat (limited to 'tests/ui/default-method-parsing.rs')
0 files changed, 0 insertions, 0 deletions