diff options
| author | 许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com> | 2024-06-11 14:16:47 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-11 14:16:47 +0100 |
| commit | cfd48bdd7e124565de8022f8b87ef5a3aa7f78cd (patch) | |
| tree | 569c4ba9fde857fd201ec0729b3f7048ddb0051a /compiler/rustc_parse/src | |
| parent | 2a94a5bc218c6af1667a856f9fee1fdfe892fdc7 (diff) | |
| parent | de4ac0c465facfdfd56ce08dc6bb5cfee901561c (diff) | |
| download | rust-cfd48bdd7e124565de8022f8b87ef5a3aa7f78cd.tar.gz rust-cfd48bdd7e124565de8022f8b87ef5a3aa7f78cd.zip | |
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`
Diffstat (limited to 'compiler/rustc_parse/src')
0 files changed, 0 insertions, 0 deletions
