diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e3b16a2..27ac4f1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: toolchain: ${{matrix.rust}} - name: Enable type layout randomization run: echo RUSTFLAGS=${RUSTFLAGS}\ -Zrandomize-layout >> $GITHUB_ENV - if: startsWith(matrix.rust, 'nightly') + if: startsWith(matrix.rust, 'nightly') && false # FIXME https://github.com/rust-lang/rust/issues/113941 - run: cargo test clippy: 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..050299b 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -4,6 +4,7 @@ struct Thing(usize); #[test] fn test_iter() { - assert_eq!(0, mem::size_of::>()); - assert_eq!(1, mem::align_of::>()); + // https://github.com/rust-lang/rust/issues/113941 + assert_eq!(16, mem::size_of::>()); // FIXME + assert_eq!(8, mem::align_of::>()); // FIXME }