diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-02-06 04:13:29 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-06 04:13:29 +0100 |
| commit | 58bfe72f52d2f5bb32ca4d46ec84de5dfad1bda9 (patch) | |
| tree | ad956d6f15e1dd0d245aa5a0eee45d885d5d4925 /src/test/ui/consts | |
| parent | 88fb06a1f331926bccb448acdb52966fd1ec8a92 (diff) | |
| parent | badb81a6129b84a9f01223ab73a56ffe52bf33ce (diff) | |
| download | rust-58bfe72f52d2f5bb32ca4d46ec84de5dfad1bda9.tar.gz rust-58bfe72f52d2f5bb32ca4d46ec84de5dfad1bda9.zip | |
Rollup merge of #91939 - GKFX:feature-91866, r=cjgillot
Clarify error on casting larger integers to char Closes #91836 with changes to E0604.md and a `span_help`.
Diffstat (limited to 'src/test/ui/consts')
| -rw-r--r-- | src/test/ui/consts/const-eval/const-eval-overflow-4b.stderr | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/ui/consts/const-eval/const-eval-overflow-4b.stderr b/src/test/ui/consts/const-eval/const-eval-overflow-4b.stderr index 1e181c465db..f59ff329d18 100644 --- a/src/test/ui/consts/const-eval/const-eval-overflow-4b.stderr +++ b/src/test/ui/consts/const-eval/const-eval-overflow-4b.stderr @@ -17,6 +17,12 @@ error[E0604]: only `u8` can be cast as `char`, not `i8` | LL | : [u32; 5i8 as char as usize] | ^^^^^^^^^^^ invalid cast + | +help: try casting from `u8` instead + --> $DIR/const-eval-overflow-4b.rs:22:13 + | +LL | : [u32; 5i8 as char as usize] + | ^^^^^^^^^^^ error: aborting due to 3 previous errors |
