File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed
Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -753,24 +753,15 @@ impl<T: NumCast> NumCast for Wrapping<T> {
753753/// # Safety
754754///
755755/// **In Rust versions before 1.45.0**, some uses of the `as` operator were not entirely safe.
756- /// In particular, it was undefined behavior if:
757- ///
758- /// - A truncated floating point value cannot fit in the target integer
759- /// type ([#10184](https://github.com/rust-lang/rust/issues/10184));
756+ /// In particular, it was undefined behavior if
757+ /// a truncated floating point value could not fit in the target integer
758+ /// type ([#10184](https://github.com/rust-lang/rust/issues/10184)).
760759///
761760/// ```ignore
762761/// # use num_traits::AsPrimitive;
763762/// let x: u8 = (1.04E+17).as_(); // UB
764763/// ```
765764///
766- /// - Or a floating point value does not fit in another floating
767- /// point type ([#15536](https://github.com/rust-lang/rust/issues/15536)).
768- ///
769- /// ```ignore
770- /// # use num_traits::AsPrimitive;
771- /// let x: f32 = (1e300f64).as_(); // UB
772- /// ```
773- ///
774765pub trait AsPrimitive < T > : ' static + Copy
775766where
776767 T : ' static + Copy ,
You can’t perform that action at this time.
0 commit comments