diff --git a/tests/run-pass/align_offset.rs b/tests/run-pass/align_offset.rs index 8388089b8f44..736889174839 100644 --- a/tests/run-pass/align_offset.rs +++ b/tests/run-pass/align_offset.rs @@ -56,7 +56,8 @@ fn test_align_to() { } { - let (l, m, r) = unsafe { s.align_to::() }; // requested alignment higher than allocation alignment + #[repr(align(8))] struct Align8(u64); + let (l, m, r) = unsafe { s.align_to::() }; // requested alignment higher than allocation alignment assert_eq!(l.len(), 4*N); assert_eq!(r.len(), 0); assert_eq!(m.len(), 0);