Skip to content

Commit 6d727b5

Browse files
committed
Auto merge of #137346 - workingjubilee:rollup-sxu05ms, r=workingjubilee
Rollup of 12 pull requests Successful merges: - #131651 (Create a generic AVR target: avr-none) - #134340 (Stabilize `num_midpoint_signed` feature) - #136473 (infer linker flavor by linker name if it's sufficiently specific) - #136608 (Pass through of target features to llvm-bitcode-linker and handling them) - #136985 (Do not ignore uninhabited types for function-call ABI purposes. (Remove BackendRepr::Uninhabited)) - #137270 (Fix `*-win7-windows-msvc` target since 26eeac1a1e9fe46ffd80dd0d3dafdd2c2a644306) - #137312 (Update references to cc_detect.rs) - #137318 (Workaround Cranelift not yet properly supporting vectors smaller than 128bit) - #137322 (Update docs for default features of wasm targets) - #137324 (Make x86 QNX target name consistent with other Rust targets) - #137338 (skip submodule updating logics on tarballs) - #137340 (Add a notice about missing GCC sources into source tarballs) r? `@ghost` `@rustbot` modify labels: rollup
2 parents c1e647b + a8c7bd2 commit 6d727b5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

crates/hir-ty/src/layout.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ fn layout_of_simd_ty(
194194
fields,
195195
backend_repr: BackendRepr::Vector { element: e_abi, count: e_len },
196196
largest_niche: e_ly.largest_niche,
197+
uninhabited: false,
197198
size,
198199
align,
199200
max_repr_align: None,
@@ -297,20 +298,17 @@ pub fn layout_of_ty_query(
297298
.checked_mul(count, dl)
298299
.ok_or(LayoutError::BadCalc(LayoutCalculatorError::SizeOverflow))?;
299300

300-
let backend_repr =
301-
if count != 0 && matches!(element.backend_repr, BackendRepr::Uninhabited) {
302-
BackendRepr::Uninhabited
303-
} else {
304-
BackendRepr::Memory { sized: true }
305-
};
301+
let backend_repr = BackendRepr::Memory { sized: true };
306302

307303
let largest_niche = if count != 0 { element.largest_niche } else { None };
304+
let uninhabited = if count != 0 { element.uninhabited } else { false };
308305

309306
Layout {
310307
variants: Variants::Single { index: struct_variant_idx() },
311308
fields: FieldsShape::Array { stride: element.size, count },
312309
backend_repr,
313310
largest_niche,
311+
uninhabited,
314312
align: element.align,
315313
size,
316314
max_repr_align: None,
@@ -325,6 +323,7 @@ pub fn layout_of_ty_query(
325323
fields: FieldsShape::Array { stride: element.size, count: 0 },
326324
backend_repr: BackendRepr::Memory { sized: false },
327325
largest_niche: None,
326+
uninhabited: false,
328327
align: element.align,
329328
size: Size::ZERO,
330329
max_repr_align: None,
@@ -337,6 +336,7 @@ pub fn layout_of_ty_query(
337336
fields: FieldsShape::Array { stride: Size::from_bytes(1), count: 0 },
338337
backend_repr: BackendRepr::Memory { sized: false },
339338
largest_niche: None,
339+
uninhabited: false,
340340
align: dl.i8_align,
341341
size: Size::ZERO,
342342
max_repr_align: None,

0 commit comments

Comments
 (0)