diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2025-08-14 15:41:54 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2025-08-14 15:41:54 +0000 |
| commit | 9dfee2ef35d8176bbcfb601bdf58059513049a16 (patch) | |
| tree | 0e0e5e8a9d44511c37507a5fe3726850754ed595 | |
| parent | c439a59dbd275aef9bc24c7172e2111ccc3794c3 (diff) | |
| download | rust-9dfee2ef35d8176bbcfb601bdf58059513049a16.tar.gz rust-9dfee2ef35d8176bbcfb601bdf58059513049a16.zip | |
fix alignment test
| -rw-r--r-- | tests/ui/mir/alignment/packed.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ui/mir/alignment/packed.rs b/tests/ui/mir/alignment/packed.rs index cf908365e1a..aa79880a21a 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[0].tail); + let ptr1 = std::ptr::addr_of!(memory[1].tail); // Even if ptr0 happens to be aligned by chance, ptr1 is not. assert!(!ptr0.is_aligned() || !ptr1.is_aligned()); |
