León Orell Valerian Liehr
fe420b05e3
Rollup merge of #143678 - Kivooeo:char-overflow, r=SparrowLii
...
Added error for invalid char cast
fixes rust-lang/rust#143597
not really sure if I did it right, but according to cast-char test -- it is right, also this code gave me false positive result
```
for _ in 0..(256 as u8) {}
```
so this is why I added this check `if lit_val <= 0xFF`
Also I believe that error message could be improved, but I'm not sure how exactly
cc ```@hkBst```
r? compiler
2025-07-17 03:58:31 +02:00
..
2025-07-14 09:25:54 +00:00
2025-07-07 17:28:14 +00:00
2025-07-15 09:01:00 +02:00
2025-07-15 09:01:03 +02:00
2025-07-06 15:03:08 -07:00
2025-07-10 10:26:02 -05:00
2025-07-15 11:42:55 +00:00
2025-07-15 11:42:55 +00:00
2025-07-14 18:05:47 +02:00
2025-07-15 11:42:55 +00:00
2025-07-09 16:37:11 +00:00
2025-07-17 03:58:28 +02:00
2025-07-17 03:58:28 +02:00
2025-07-17 03:58:28 +02:00
2025-07-17 03:58:30 +02:00
2025-07-07 15:16:42 +02:00
2025-07-14 09:25:54 +00:00
2025-07-15 09:21:27 +02:00
2025-07-11 07:35:20 +02:00
2025-07-15 09:21:26 +02:00
2025-07-13 23:55:06 +08:00
2025-07-16 08:28:17 +03:00
2025-07-17 03:58:30 +02:00
2025-07-13 13:50:01 +00:00
2025-07-13 04:20:07 +00:00
2025-07-05 10:55:42 +02:00
2025-07-13 19:22:17 +00:00
2025-07-11 13:32:03 +00:00
2025-07-10 10:25:29 -05:00
2025-07-17 03:58:31 +02:00
2025-07-13 01:11:56 +00:00
2025-07-11 13:32:03 +00:00
2025-07-06 09:51:47 +02:00
2025-07-16 08:28:17 +03:00
2025-07-17 03:58:30 +02:00
2025-07-14 04:29:53 +00:00
2025-07-11 10:56:50 +02:00
2025-07-10 09:36:20 +02:00
2025-07-09 16:37:11 +00:00
2025-07-05 18:41:59 +00:00
2025-07-15 11:42:55 +00:00
2025-07-14 23:16:31 +02:00
2025-07-04 23:47:31 -07:00
2025-07-13 13:50:01 +00:00
2025-07-14 09:25:54 +00:00
2025-07-14 09:25:54 +00:00
2025-07-07 12:58:16 +00:00
2025-07-05 10:55:35 +02:00
2025-07-16 08:30:48 +03:00
2025-07-01 19:00:21 +00:00
2025-07-05 10:55:42 +02:00
2025-07-08 09:21:35 +00:00
2025-07-16 00:32:12 +08:00
2025-07-01 19:00:21 +00:00
2025-07-17 03:58:29 +02:00
2025-07-14 18:05:47 +02:00
2025-07-02 00:33:06 +00:00
2025-07-07 09:04:53 +02:00
2025-07-13 13:50:01 +00:00
2025-07-14 18:14:02 +02:00