about summary refs log tree commit diff
path: root/tests/ui/mir/alignment/packed.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-09-11 09:04:28 +0000
committerbors <bors@rust-lang.org>2025-09-11 09:04:28 +0000
commit76c5ed2847cdb26ef2822a3a165d710f6b772217 (patch)
treee7eaf5da90738ef6953b28d81471a12d3a9296fc /tests/ui/mir/alignment/packed.rs
parent5e33838ccad070f1536ed82336dd0133e2681233 (diff)
parent613a3b6a42b5c7413fe4a8ffd4f16ec39c32a814 (diff)
downloadrust-76c5ed2847cdb26ef2822a3a165d710f6b772217.tar.gz
rust-76c5ed2847cdb26ef2822a3a165d710f6b772217.zip
Auto merge of #146429 - Zalathar:rollup-eivhl6u, r=Zalathar
Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#142315 (core::ptr: deduplicate docs for as_ref, addr, and as_uninit_ref)
 - rust-lang/rust#146335 (disable core dumps for panic-uninitialized-zeroed)
 - rust-lang/rust#146347 (report duplicate symbols added by the driver)
 - rust-lang/rust#146370 (Update the LoongArch target documentation)
 - rust-lang/rust#146379 (Fix `compare_against_sw_vers` test)
 - rust-lang/rust#146380 (Unify and deduplicate bits conv float tests)
 - rust-lang/rust#146415 (s390x: mark soft-float target feature as incompatible)
 - rust-lang/rust#146422 (Less greedily parse `[const]` bounds)
 - rust-lang/rust#146424 (Improve `core::ops` coverage)
 - rust-lang/rust#146425 (Improve `core::array` coverage)
 - rust-lang/rust#146428 (Revert `assert!` desugaring changes (rust-lang/rust#122661))

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'tests/ui/mir/alignment/packed.rs')
-rw-r--r--tests/ui/mir/alignment/packed.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ui/mir/alignment/packed.rs b/tests/ui/mir/alignment/packed.rs
index aa79880a21a..cf908365e1a 100644
--- a/tests/ui/mir/alignment/packed.rs
+++ b/tests/ui/mir/alignment/packed.rs
@@ -12,7 +12,7 @@ fn main() {
     // Test that we can use addr_of! to get the address of a packed member which according to its
     // type is not aligned, but because it is a projection from a packed type is a valid place.
     let ptr0 = std::ptr::addr_of!(memory[0].tail);
-    let ptr1 = std::ptr::addr_of!(memory[1].tail);
+    let ptr1 = std::ptr::addr_of!(memory[0].tail);
     // Even if ptr0 happens to be aligned by chance, ptr1 is not.
     assert!(!ptr0.is_aligned() || !ptr1.is_aligned());