Lower anonymous structs or unions to HIR
This commit is contained in:
parent
084ce5bdb5
commit
879a1e5713
38 changed files with 288 additions and 174 deletions
|
@ -21,8 +21,7 @@ macro_rules! rtry {
|
|||
fn representability(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Representability {
|
||||
match tcx.def_kind(def_id) {
|
||||
DefKind::Struct | DefKind::Union | DefKind::Enum => {
|
||||
let adt_def = tcx.adt_def(def_id);
|
||||
for variant in adt_def.variants() {
|
||||
for variant in tcx.adt_def(def_id).variants() {
|
||||
for field in variant.fields.iter() {
|
||||
rtry!(tcx.representability(field.did.expect_local()));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue