Skip to content

Commit 9dfee2e

Browse files
committed
fix alignment test
1 parent c439a59 commit 9dfee2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/ui/mir/alignment/packed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fn main() {
1212
// Test that we can use addr_of! to get the address of a packed member which according to its
1313
// type is not aligned, but because it is a projection from a packed type is a valid place.
1414
let ptr0 = std::ptr::addr_of!(memory[0].tail);
15-
let ptr1 = std::ptr::addr_of!(memory[0].tail);
15+
let ptr1 = std::ptr::addr_of!(memory[1].tail);
1616
// Even if ptr0 happens to be aligned by chance, ptr1 is not.
1717
assert!(!ptr0.is_aligned() || !ptr1.is_aligned());
1818

0 commit comments

Comments
 (0)