about summary refs log tree commit diff
path: root/compiler/rustc_ty_utils/src
diff options
context:
space:
mode:
authorTshepang Mbambo <tshepang@gmail.com>2025-04-28 06:25:10 +0200
committerGitHub <noreply@github.com>2025-04-28 06:25:10 +0200
commit1b53c12753a9ecead0e9728e01dcc2a7c07c18f9 (patch)
tree87e76fd223f1937ee26537e1028d44e7f6b65544 /compiler/rustc_ty_utils/src
parentd91ffb6da5c306150e53f73a361f69837bc39851 (diff)
parentaa15830ee2defbac8e784db5510bb914e6e4c820 (diff)
downloadrust-1b53c12753a9ecead0e9728e01dcc2a7c07c18f9.tar.gz
rust-1b53c12753a9ecead0e9728e01dcc2a7c07c18f9.zip
Merge pull request #2358 from rust-lang/rustc-pull
Rustc pull update
Diffstat (limited to 'compiler/rustc_ty_utils/src')
-rw-r--r--compiler/rustc_ty_utils/src/abi.rs3
-rw-r--r--compiler/rustc_ty_utils/src/lib.rs2
2 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_ty_utils/src/abi.rs b/compiler/rustc_ty_utils/src/abi.rs
index 3d4ab33240a..63ea035bd0e 100644
--- a/compiler/rustc_ty_utils/src/abi.rs
+++ b/compiler/rustc_ty_utils/src/abi.rs
@@ -347,7 +347,8 @@ fn adjust_for_rust_scalar<'tcx>(
             None
         };
         if let Some(kind) = kind {
-            attrs.pointee_align = Some(pointee.align);
+            attrs.pointee_align =
+                Some(pointee.align.min(cx.tcx().sess.target.max_reliable_alignment()));
 
             // `Box` are not necessarily dereferenceable for the entire duration of the function as
             // they can be deallocated at any time. Same for non-frozen shared references (see
diff --git a/compiler/rustc_ty_utils/src/lib.rs b/compiler/rustc_ty_utils/src/lib.rs
index 57051e0df55..ea0f6b8dfba 100644
--- a/compiler/rustc_ty_utils/src/lib.rs
+++ b/compiler/rustc_ty_utils/src/lib.rs
@@ -6,6 +6,7 @@
 
 // tidy-alphabetical-start
 #![allow(internal_features)]
+#![cfg_attr(bootstrap, feature(let_chains))]
 #![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
 #![doc(rust_logo)]
 #![feature(assert_matches)]
@@ -13,7 +14,6 @@
 #![feature(box_patterns)]
 #![feature(if_let_guard)]
 #![feature(iterator_try_collect)]
-#![feature(let_chains)]
 #![feature(never_type)]
 #![feature(rustdoc_internals)]
 // tidy-alphabetical-end