use bug! for overflow of u128
This commit is contained in:
parent
b133841bfc
commit
3bbc598d16
1 changed files with 4 additions and 1 deletions
|
|
@ -87,7 +87,10 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||
if let Some(v) = u128::from(size.bytes()).checked_mul(8) {
|
||||
format!("{} bits", v)
|
||||
} else {
|
||||
format!("{} bytes", size.bytes())
|
||||
// `u128` should definitely be able to hold the size of different architectures
|
||||
// larger sizes should be reported as error `are too big for the current architecture`
|
||||
// otherwise we have a bug somewhere
|
||||
bug!("{:?} overflow for u128", size)
|
||||
}
|
||||
}
|
||||
Ok(SizeSkeleton::Generic(size)) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue