Do not assert in try_to_int.
This commit is contained in:
parent
f222a2dd8f
commit
d35be6c097
@ -2317,7 +2317,7 @@ impl<'tcx> ConstantKind<'tcx> {
|
||||
|
||||
#[inline]
|
||||
pub fn try_to_scalar_int(self) -> Option<ScalarInt> {
|
||||
Some(self.try_to_scalar()?.assert_int())
|
||||
self.try_to_scalar()?.try_to_int().ok()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
Loading…
x
Reference in New Issue
Block a user