Skip to content

Commit 789c38f

Browse files
Fixed cast imports in doctest (#355)
1 parent f2f9bd7 commit 789c38f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/core_simd/src/elements/float.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ pub trait SimdFloat: Copy + Sealed {
2626
/// # Example
2727
/// ```
2828
/// # #![feature(portable_simd)]
29-
/// # use core::simd::Simd;
29+
/// # #[cfg(feature = "as_crate")] use core_simd::simd;
30+
/// # #[cfg(not(feature = "as_crate"))] use core::simd;
31+
/// # use simd::{f32x2, SimdFloat, SimdInt, Simd};
3032
/// let floats: Simd<f32, 4> = Simd::from_array([1.9, -4.5, f32::INFINITY, f32::NAN]);
3133
/// let ints = floats.cast::<i32>();
3234
/// assert_eq!(ints, Simd::from_array([1, -4, i32::MAX, 0]));

0 commit comments

Comments
 (0)