Add a test for field default value body as defining usage of TAIT

This commit is contained in:
Shoyu Vanilla 2025-01-27 00:48:19 +09:00
parent ce9da90630
commit 4fe18a6fb5
3 changed files with 141 additions and 27 deletions

View file

@ -1399,11 +1399,7 @@ impl HasModule for DefWithBodyId {
DefWithBodyId::ConstId(it) => it.module(db),
DefWithBodyId::VariantId(it) => it.module(db),
DefWithBodyId::InTypeConstId(it) => it.lookup(db).owner.module(db),
DefWithBodyId::FieldId(it) => match it.parent {
VariantId::EnumVariantId(it) => it.module(db),
VariantId::StructId(it) => it.module(db),
VariantId::UnionId(it) => it.module(db),
},
DefWithBodyId::FieldId(it) => it.module(db),
}
}
}