interpret: err instead of ICE on size mismatches in to_bits_or_ptr_internal
This commit is contained in:
parent
b6ab1fae73
commit
38004b72bc
16 changed files with 107 additions and 67 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue