diff options
| author | bors <bors@rust-lang.org> | 2025-04-14 00:47:02 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-04-14 00:47:02 +0000 |
| commit | 15f58c46da79399961a09db0c650a2f90f442e6b (patch) | |
| tree | 9bf1ad8b7fb9fe0fd010df00a06f023d2801b2ca /compiler/rustc_abi/src/layout.rs | |
| parent | 6e830462330a9e34d8176e86d4580dd0820c6fd5 (diff) | |
| parent | 7ce62af35a3572640140cbe6b346f75ceedd1a90 (diff) | |
| download | rust-15f58c46da79399961a09db0c650a2f90f442e6b.tar.gz rust-15f58c46da79399961a09db0c650a2f90f442e6b.zip | |
Auto merge of #139766 - jhpratt:rollup-afrfmnk, r=jhpratt
Rollup of 10 pull requests Successful merges: - #137043 (Initial `UnsafePinned` implementation [Part 1: Libs]) - #138962 (Expect an array when expected and acutal types are both arrays during cast) - #139001 (add `naked_functions_rustic_abi` feature gate) - #139379 (Use delayed bug for normalization errors in drop elaboration) - #139582 (Various coercion cleanups) - #139628 (Suggest remove redundant `$()?` around `vis`) - #139644 (Micro-optimize `InstSimplify`'s `simplify_primitive_clone`) - #139674 (In `rustc_mir_transform`, iterate over index newtypes instead of ints) - #139740 (Convert `tests/ui/lint/dead-code/self-assign.rs` to a known-bug test) - #139741 (fix smir's run! doc and import) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_abi/src/layout.rs')
| -rw-r--r-- | compiler/rustc_abi/src/layout.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_abi/src/layout.rs b/compiler/rustc_abi/src/layout.rs index 7bffeaf4cc9..42250aa173b 100644 --- a/compiler/rustc_abi/src/layout.rs +++ b/compiler/rustc_abi/src/layout.rs @@ -315,7 +315,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> { repr: &ReprOptions, variants: &IndexSlice<VariantIdx, IndexVec<FieldIdx, F>>, is_enum: bool, - is_unsafe_cell: bool, + is_special_no_niche: bool, scalar_valid_range: (Bound<u128>, Bound<u128>), discr_range_of_repr: impl Fn(i128, i128) -> (Integer, bool), discriminants: impl Iterator<Item = (VariantIdx, i128)>, @@ -348,7 +348,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> { repr, variants, is_enum, - is_unsafe_cell, + is_special_no_niche, scalar_valid_range, always_sized, present_first, @@ -505,7 +505,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> { repr: &ReprOptions, variants: &IndexSlice<VariantIdx, IndexVec<FieldIdx, F>>, is_enum: bool, - is_unsafe_cell: bool, + is_special_no_niche: bool, scalar_valid_range: (Bound<u128>, Bound<u128>), always_sized: bool, present_first: VariantIdx, @@ -524,7 +524,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> { let mut st = self.univariant(&variants[v], repr, kind)?; st.variants = Variants::Single { index: v }; - if is_unsafe_cell { + if is_special_no_niche { let hide_niches = |scalar: &mut _| match scalar { Scalar::Initialized { value, valid_range } => { *valid_range = WrappingRange::full(value.size(dl)) |
