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
This commit is contained in:
bors 2025-02-21 00:16:10 +00:00
commit 6d727b5e35

View File

@ -194,6 +194,7 @@ fn layout_of_simd_ty(
fields,
backend_repr: BackendRepr::Vector { element: e_abi, count: e_len },
largest_niche: e_ly.largest_niche,
uninhabited: false,
size,
align,
max_repr_align: None,
@ -297,20 +298,17 @@ pub fn layout_of_ty_query(
.checked_mul(count, dl)
.ok_or(LayoutError::BadCalc(LayoutCalculatorError::SizeOverflow))?;
let backend_repr =
if count != 0 && matches!(element.backend_repr, BackendRepr::Uninhabited) {
BackendRepr::Uninhabited
} else {
BackendRepr::Memory { sized: true }
};
let backend_repr = BackendRepr::Memory { sized: true };
let largest_niche = if count != 0 { element.largest_niche } else { None };
let uninhabited = if count != 0 { element.uninhabited } else { false };
Layout {
variants: Variants::Single { index: struct_variant_idx() },
fields: FieldsShape::Array { stride: element.size, count },
backend_repr,
largest_niche,
uninhabited,
align: element.align,
size,
max_repr_align: None,
@ -325,6 +323,7 @@ pub fn layout_of_ty_query(
fields: FieldsShape::Array { stride: element.size, count: 0 },
backend_repr: BackendRepr::Memory { sized: false },
largest_niche: None,
uninhabited: false,
align: element.align,
size: Size::ZERO,
max_repr_align: None,
@ -337,6 +336,7 @@ pub fn layout_of_ty_query(
fields: FieldsShape::Array { stride: Size::from_bytes(1), count: 0 },
backend_repr: BackendRepr::Memory { sized: false },
largest_niche: None,
uninhabited: false,
align: dl.i8_align,
size: Size::ZERO,
max_repr_align: None,