ScalarInt: size mismatches are a bug, do not delay the panic
This commit is contained in:
parent
13423befc4
commit
3c57ea0df7
45 changed files with 247 additions and 313 deletions
|
@ -47,7 +47,7 @@ fn destructure_const<'tcx>(
|
|||
ty::Adt(def, args) => {
|
||||
let (variant_idx, branches) = if def.is_enum() {
|
||||
let (head, rest) = branches.split_first().unwrap();
|
||||
(VariantIdx::from_u32(head.unwrap_leaf().try_to_u32().unwrap()), rest)
|
||||
(VariantIdx::from_u32(head.unwrap_leaf().to_u32()), rest)
|
||||
} else {
|
||||
(FIRST_VARIANT, branches)
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue