diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 90543044ea8..b292be2d6f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -141,6 +141,11 @@ jobs: - name: Test (release) run: cargo test --verbose --target=${{ matrix.target }} --release + - name: Generate docs + run: cargo doc --verbose --target=${{ matrix.target }} + env: + RUSTDOCFLAGS: -Dwarnings + wasm-tests: name: "wasm (firefox, ${{ matrix.name }})" runs-on: ubuntu-latest diff --git a/crates/core_simd/src/lib.rs b/crates/core_simd/src/lib.rs index a2e40e81105..7a161b7e01d 100644 --- a/crates/core_simd/src/lib.rs +++ b/crates/core_simd/src/lib.rs @@ -40,6 +40,7 @@ )] #![warn(missing_docs, clippy::missing_inline_in_public_items)] // basically all items, really #![deny(unsafe_op_in_unsafe_fn, clippy::undocumented_unsafe_blocks)] +#![doc(test(attr(deny(warnings))))] #![allow(internal_features)] #![unstable(feature = "portable_simd", issue = "86656")] //! Portable SIMD module. diff --git a/crates/core_simd/src/vector.rs b/crates/core_simd/src/vector.rs index 2d8b48a9a8f..6c8205b112c 100644 --- a/crates/core_simd/src/vector.rs +++ b/crates/core_simd/src/vector.rs @@ -325,7 +325,7 @@ pub fn copy_to_slice(self, slice: &mut [T]) { /// # #![feature(portable_simd)] /// # #[cfg(feature = "as_crate")] use core_simd::simd; /// # #[cfg(not(feature = "as_crate"))] use core::simd; - /// # use simd::{Simd, Mask}; + /// # use simd::Simd; /// let vec: Vec = vec![10, 11]; /// /// let result = Simd::::load_or_default(&vec); @@ -348,7 +348,7 @@ pub fn load_or_default(slice: &[T]) -> Self /// # #![feature(portable_simd)] /// # #[cfg(feature = "as_crate")] use core_simd::simd; /// # #[cfg(not(feature = "as_crate"))] use core::simd; - /// # use simd::{Simd, Mask}; + /// # use simd::Simd; /// let vec: Vec = vec![10, 11]; /// let or = Simd::from_array([-5, -4, -3, -2]); /// @@ -695,7 +695,7 @@ pub unsafe fn store_select_unchecked( /// /// # Safety /// - /// Memory addresses for element are calculated [`core::ptr::wrapping_offset`] and + /// Memory addresses for element are calculated [`pointer::wrapping_offset`] and /// each enabled element must satisfy the same conditions as [`core::ptr::write`]. #[inline] pub unsafe fn store_select_ptr(self, ptr: *mut T, enable: Mask<::Mask, N>) {