Do not assert in try_to_int.
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user