Skip to content

Commit e536d05

Browse files
committed
also initialize Layout field in rust-analyzer
1 parent 778b460 commit e536d05

File tree

1 file changed

+4
-0
lines changed
  • src/tools/rust-analyzer/crates/hir-ty/src

1 file changed

+4
-0
lines changed

Diff for: src/tools/rust-analyzer/crates/hir-ty/src/layout.rs

+4
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ fn layout_of_simd_ty(
197197
align,
198198
max_repr_align: None,
199199
unadjusted_abi_align: align.abi,
200+
randomization_seed: 0,
200201
}))
201202
}
202203

@@ -313,6 +314,7 @@ pub fn layout_of_ty_query(
313314
size,
314315
max_repr_align: None,
315316
unadjusted_abi_align: element.align.abi,
317+
randomization_seed: 0,
316318
}
317319
}
318320
TyKind::Slice(element) => {
@@ -326,6 +328,7 @@ pub fn layout_of_ty_query(
326328
size: Size::ZERO,
327329
max_repr_align: None,
328330
unadjusted_abi_align: element.align.abi,
331+
randomization_seed: 0,
329332
}
330333
}
331334
TyKind::Str => Layout {
@@ -337,6 +340,7 @@ pub fn layout_of_ty_query(
337340
size: Size::ZERO,
338341
max_repr_align: None,
339342
unadjusted_abi_align: dl.i8_align.abi,
343+
randomization_seed: 0,
340344
},
341345
// Potentially-wide pointers.
342346
TyKind::Ref(_, _, pointee) | TyKind::Raw(_, pointee) => {

0 commit comments

Comments
 (0)