Validate generating docs (rust-lang/portable-simd#407)
- Generate docs with warnings disabled. - Instruct doctest to add `#![deny(warnings)]` to all tests.
This commit is contained in:
parent
53de3f0806
commit
cff979eec1
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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<i32> = vec![10, 11];
|
||||
///
|
||||
/// let result = Simd::<i32, 4>::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<i32> = 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<<T as SimdElement>::Mask, N>) {
|
||||
|
Loading…
Reference in New Issue
Block a user