Skip to content

Commit

Permalink
also initialize Layout field in rust-analyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
the8472 committed Nov 17, 2024
1 parent 778b460 commit e536d05
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/tools/rust-analyzer/crates/hir-ty/src/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ fn layout_of_simd_ty(
align,
max_repr_align: None,
unadjusted_abi_align: align.abi,
randomization_seed: 0,
}))
}

Expand Down Expand Up @@ -313,6 +314,7 @@ pub fn layout_of_ty_query(
size,
max_repr_align: None,
unadjusted_abi_align: element.align.abi,
randomization_seed: 0,
}
}
TyKind::Slice(element) => {
Expand All @@ -326,6 +328,7 @@ pub fn layout_of_ty_query(
size: Size::ZERO,
max_repr_align: None,
unadjusted_abi_align: element.align.abi,
randomization_seed: 0,
}
}
TyKind::Str => Layout {
Expand All @@ -337,6 +340,7 @@ pub fn layout_of_ty_query(
size: Size::ZERO,
max_repr_align: None,
unadjusted_abi_align: dl.i8_align.abi,
randomization_seed: 0,
},
// Potentially-wide pointers.
TyKind::Ref(_, _, pointee) | TyKind::Raw(_, pointee) => {
Expand Down

0 comments on commit e536d05

Please sign in to comment.