summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_pattern_analysis/src')
-rw-r--r--compiler/rustc_pattern_analysis/src/rustc/print.rs8
1 files changed, 1 insertions, 7 deletions
diff --git a/compiler/rustc_pattern_analysis/src/rustc/print.rs b/compiler/rustc_pattern_analysis/src/rustc/print.rs
index b85c15d8392..d14233ee024 100644
--- a/compiler/rustc_pattern_analysis/src/rustc/print.rs
+++ b/compiler/rustc_pattern_analysis/src/rustc/print.rs
@@ -116,13 +116,7 @@ fn write_struct_like<'tcx>(
             Some((variant, name))
         }),
         EnumInfo::NotEnum => ty.ty_adt_def().and_then(|adt_def| {
-            if !adt_def.is_enum() {
-                ty::tls::with(|tcx| {
-                    Some((adt_def.non_enum_variant(), tcx.def_path_str(adt_def.did())))
-                })
-            } else {
-                None
-            }
+            ty::tls::with(|tcx| Some((adt_def.non_enum_variant(), tcx.def_path_str(adt_def.did()))))
         }),
     };