Skip to content

Commit

Permalink
Fixed cast imports in doctest (#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
workingjubilee authored Jul 7, 2023
1 parent f2f9bd7 commit 789c38f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/core_simd/src/elements/float.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ pub trait SimdFloat: Copy + Sealed {
/// # Example
/// ```
/// # #![feature(portable_simd)]
/// # use core::simd::Simd;
/// # #[cfg(feature = "as_crate")] use core_simd::simd;
/// # #[cfg(not(feature = "as_crate"))] use core::simd;
/// # use simd::{f32x2, SimdFloat, SimdInt, Simd};
/// let floats: Simd<f32, 4> = Simd::from_array([1.9, -4.5, f32::INFINITY, f32::NAN]);
/// let ints = floats.cast::<i32>();
/// assert_eq!(ints, Simd::from_array([1, -4, i32::MAX, 0]));
Expand Down

0 comments on commit 789c38f

Please sign in to comment.