mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
Remove an impossible case under EnumInfo::NotEnum
This commit is contained in:
parent
74f76ae5ea
commit
4cd800503f
@ -116,13 +116,7 @@ fn write_struct_like<'tcx>(
|
|||||||
Some((variant, name))
|
Some((variant, name))
|
||||||
}),
|
}),
|
||||||
EnumInfo::NotEnum => ty.ty_adt_def().and_then(|adt_def| {
|
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()))))
|
||||||
ty::tls::with(|tcx| {
|
|
||||||
Some((adt_def.non_enum_variant(), tcx.def_path_str(adt_def.did())))
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
None
|
|
||||||
}
|
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user