diff --git a/src/lib.rs b/src/lib.rs index 398a181..ab14180 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -246,7 +246,9 @@ document_iter! { mod void_iter { enum Void {} - pub struct Iter([*const T; 0], Void); + // https://github.com/rust-lang/rust/issues/113941 + const WORK_AROUND_RUST_ISSUE_113941: usize = 1; + pub struct Iter([*const T; WORK_AROUND_RUST_ISSUE_113941], Void); unsafe impl Send for Iter {} unsafe impl Sync for Iter {} diff --git a/tests/test.rs b/tests/test.rs index 4744cec..ce2f798 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -4,6 +4,6 @@ struct Thing(usize); #[test] fn test_iter() { - assert_eq!(0, mem::size_of::>()); - assert_eq!(1, mem::align_of::>()); + assert_eq!(16, mem::size_of::>()); + assert_eq!(8, mem::align_of::>()); }