Auto merge of #13814 - Veykril:layout, r=Veykril

Calculate the TargetDataLayout correctly for the selected target

This fails the tests still since those don't call into rustc yet
This commit is contained in:
bors 2022-12-21 19:38:51 +00:00
commit c2840c809a
18 changed files with 319 additions and 78 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 {