We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
EnumInfo::NotEnum
1 parent 74f76ae commit 4cd8005Copy full SHA for 4cd8005
compiler/rustc_pattern_analysis/src/rustc/print.rs
@@ -116,13 +116,7 @@ fn write_struct_like<'tcx>(
116
Some((variant, name))
117
}),
118
EnumInfo::NotEnum => ty.ty_adt_def().and_then(|adt_def| {
119
- if !adt_def.is_enum() {
120
- ty::tls::with(|tcx| {
121
- Some((adt_def.non_enum_variant(), tcx.def_path_str(adt_def.did())))
122
- })
123
- } else {
124
- None
125
- }
+ ty::tls::with(|tcx| Some((adt_def.non_enum_variant(), tcx.def_path_str(adt_def.did()))))
126
127
};
128
0 commit comments