diff options
| author | Zalathar <Zalathar@users.noreply.github.com> | 2024-08-02 20:10:17 +1000 |
|---|---|---|
| committer | Zalathar <Zalathar@users.noreply.github.com> | 2024-08-07 20:52:46 +1000 |
| commit | 4cd800503f0c0ba3c26f30c98aff755be6b9be43 (patch) | |
| tree | d5f6f7ec3209ada47c296c5fc812a822f418e2ae /compiler/rustc_pattern_analysis | |
| parent | 74f76ae5ea1a9fcd0b3d7adbac93b98237e4063e (diff) | |
| download | rust-4cd800503f0c0ba3c26f30c98aff755be6b9be43.tar.gz rust-4cd800503f0c0ba3c26f30c98aff755be6b9be43.zip | |
Remove an impossible case under `EnumInfo::NotEnum`
Diffstat (limited to 'compiler/rustc_pattern_analysis')
| -rw-r--r-- | compiler/rustc_pattern_analysis/src/rustc/print.rs | 8 |
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())))) }), }; |
