Dedup tag reading
This commit is contained in:
parent
b0d3daed40
commit
860e2b802f
1 changed files with 1 additions and 4 deletions
|
|
@ -455,10 +455,7 @@ impl<'a, 'mir, 'tcx: 'mir + 'a> EvalContextExt<'tcx> for EvalContext<'a, 'mir, '
|
|||
}
|
||||
|
||||
// Discriminant field for enums (where applicable).
|
||||
Variants::Tagged { ref tag, .. } => {
|
||||
assert_eq!(i, 0);
|
||||
return Ok(tag.value.to_ty(tcx))
|
||||
},
|
||||
Variants::Tagged { tag: ref discr, .. } |
|
||||
Variants::NicheFilling { niche: ref discr, .. } => {
|
||||
assert_eq!(i, 0);
|
||||
return Ok(discr.value.to_ty(tcx))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue