许杰友 Jieyou Xu (Joe)
cfd48bdd7e
Rollup merge of #126265 - RalfJung:interpret-cast-validity, r=oli-obk
...
interpret: ensure we check bool/char for validity when they are used in a cast
In general, `Scalar::to_bits` is a bit dangerous as it bypasses all type information. We should usually prefer matching on the type and acting according to that. So I also refactored `unary_op` handling of integers to do that. The remaining `to_bits` uses are operations that just fundamentally don't care about the sign (and only work on integers).
invalid_char_cast.rs is the key new test, the others already passed before this PR.
r? `@oli-obk`
2024-06-11 14:16:47 +01:00
..
2024-05-21 19:22:04 +02:00
2024-06-07 20:14:28 +02:00
2024-06-10 19:55:49 +10:00
2024-06-10 21:27:25 +03:00
2024-06-06 20:26:27 -05:00
2024-06-07 20:14:28 +02:00
2024-05-21 20:16:39 +00:00
2024-06-10 19:55:49 +10:00
2024-06-06 07:50:19 -04:00
2024-06-06 20:54:51 -05:00
2024-06-10 13:43:16 +02:00
2024-06-10 13:43:16 +02:00
2024-06-10 21:12:25 +02:00
2024-06-10 13:43:16 +02:00
2024-06-11 12:16:09 +02:00
2024-06-10 19:55:49 +10:00
2024-06-10 19:55:49 +10:00
2024-06-05 18:21:08 +02:00
2024-05-27 08:44:12 +00:00
2024-05-27 08:44:12 +00:00
2024-06-11 09:14:34 +01:00
2024-06-08 18:17:55 +02:00
2024-06-07 09:08:59 +00:00
2024-06-07 09:08:59 +00:00
2024-06-07 08:33:58 +00:00
2024-06-10 21:12:25 +02:00
2024-05-24 15:17:21 +10:00
2024-06-10 19:55:49 +10:00
2024-06-10 17:14:49 +05:30
2024-06-06 10:06:28 +00:00
2024-06-11 09:14:34 +01:00
2024-06-11 09:14:34 +01:00
2024-05-23 14:58:30 -04:00
2024-05-30 15:26:48 +02:00
2024-06-06 09:47:10 +00:00
2024-06-07 15:58:50 -04:00
2024-06-11 14:16:47 +01:00
2024-06-10 21:12:25 +02:00
2024-05-23 18:02:40 +10:00
2024-06-11 02:03:12 +00:00
2024-06-07 04:02:59 +00:00
2024-06-10 19:55:49 +10:00
2024-06-07 20:14:30 +02:00
2024-05-30 09:51:27 +08:00
2024-06-11 09:08:28 +02:00
2024-06-10 13:43:16 +02:00
2024-05-29 10:04:08 +00:00
2024-06-10 19:55:49 +10:00
2024-06-06 09:47:10 +00:00
2024-06-11 09:14:35 +01:00
2024-06-05 22:25:42 +01:00
2024-05-30 09:51:27 +08:00
2024-06-06 21:53:29 +02:00
2024-06-06 10:06:28 +00:00
2024-06-10 02:20:16 +03:00
2024-06-05 22:25:41 +01:00
2024-06-08 18:17:55 +02:00
2024-06-11 14:16:47 +01:00
2024-06-03 20:36:27 -04:00
2024-06-10 13:43:16 +02:00
2024-06-10 13:43:16 +02:00
2024-06-06 07:50:19 -04:00
2024-06-10 19:55:49 +10:00