diff options
| author | bors <bors@rust-lang.org> | 2023-09-18 14:21:48 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-09-18 14:21:48 +0000 |
| commit | 4022591cfd7890e3db8e477986d47a336cd230a7 (patch) | |
| tree | ce360c8be4761716ccf9956e78fe914a06d6e276 /tests | |
| parent | ea16f812beb8e1c709d450fcc0d2c4bb8e6f50dc (diff) | |
| parent | 3665a4102bce2cd6b09a7aea1b405cc640e076d8 (diff) | |
| download | rust-4022591cfd7890e3db8e477986d47a336cd230a7.tar.gz rust-4022591cfd7890e3db8e477986d47a336cd230a7.zip | |
Auto merge of #11517 - mojave2:issue-11426, r=Alexendoo
fix ICE by `u64::try_from(<u128>)` changelog: Fix the ICE in [`cast_possible_truncation`], when the `Shr` bits is larger than `u64::MAX` fix #11426
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/cast.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/ui/cast.rs b/tests/ui/cast.rs index d0a092093f3..1ca18170f8a 100644 --- a/tests/ui/cast.rs +++ b/tests/ui/cast.rs @@ -361,3 +361,7 @@ fn avoid_subtract_overflow(q: u32) { //~^ ERROR: casting `u32` to `u8` may truncate the value c as usize; } + +fn issue11426() { + (&42u8 >> 0xa9008fb6c9d81e42_0e25730562a601c8_u128) as usize; +} |
