1
Fork 0

interpret: err instead of ICE on size mismatches in to_bits_or_ptr_internal

This commit is contained in:
Ralf Jung 2022-04-07 16:22:09 -04:00
parent b6ab1fae73
commit 38004b72bc
16 changed files with 107 additions and 67 deletions

View file

@ -146,7 +146,7 @@ impl IntRange {
// straight to the result, after doing a bit of checking. (We
// could remove this branch and just fall through, which
// is more general but much slower.)
if let Ok(bits) = scalar.to_bits_or_ptr_internal(target_size) {
if let Ok(bits) = scalar.to_bits_or_ptr_internal(target_size).unwrap() {
return Some(bits);
}
}