Do not assert in try_to_int.
This commit is contained in:
parent
f222a2dd8f
commit
d35be6c097
1 changed files with 1 additions and 1 deletions
|
@ -2317,7 +2317,7 @@ impl<'tcx> ConstantKind<'tcx> {
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn try_to_scalar_int(self) -> Option<ScalarInt> {
|
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]
|
#[inline]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue