fn visit_pat(&mut self, pat: &Pat<'tcx>) {
if self.in_union_destructure {
fn visit_pat(&mut self, pat: &Pat<'tcx>) {
if self.in_union_destructure {
// binding to a variable allows getting stuff out of variable
PatKind::Binding { .. }
// match is conditional on having this value
// binding to a variable allows getting stuff out of variable
PatKind::Binding { .. }
// match is conditional on having this value
PatKind::Leaf { .. } => {
if let ty::Adt(adt_def, ..) = pat.ty.kind() {
if adt_def.is_union() {
PatKind::Leaf { .. } => {
if let ty::Adt(adt_def, ..) = pat.ty.kind() {
if adt_def.is_union() {