internal: Treat the self param as different from patterns when lowering

This commit is contained in:
Lukas Wirth 2024-03-06 15:57:05 +01:00
parent 0931361b8f
commit 458f4a2960
18 changed files with 256 additions and 144 deletions

View file

@ -371,8 +371,8 @@ pub fn layout_of_ty_query(
TyKind::Never => cx.layout_of_never_type(),
TyKind::Dyn(_) | TyKind::Foreign(_) => {
let mut unit = layout_of_unit(&cx, dl)?;
match unit.abi {
Abi::Aggregate { ref mut sized } => *sized = false,
match &mut unit.abi {
Abi::Aggregate { sized } => *sized = false,
_ => return Err(LayoutError::Unknown),
}
unit