Calculate the TargetDataLayout correctly for the selected target

This commit is contained in:
Lukas Wirth 2022-12-21 15:11:24 +01:00
parent 9ed1829f1f
commit 33591cd3f4
15 changed files with 247 additions and 62 deletions

View file

@ -866,7 +866,7 @@ impl Field {
}
pub fn layout(&self, db: &dyn HirDatabase) -> Result<Layout, LayoutError> {
layout_of_ty(db, &self.ty(db).ty)
layout_of_ty(db, &self.ty(db).ty, self.parent.module(db).krate().into())
}
pub fn parent_def(&self, _db: &dyn HirDatabase) -> VariantDef {