Prechádzať zdrojové kódy

update AsPrimitive Safety docs for rust 1.45

Martin Taibr 4 rokov pred
rodič
commit
7d26cecdab
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 2 2
      src/cast.rs

+ 2 - 2
src/cast.rs

@@ -752,8 +752,8 @@ impl<T: NumCast> NumCast for Wrapping<T> {
 ///
 /// # Safety
 ///
-/// Currently, some uses of the `as` operator are not entirely safe.
-/// In particular, it is undefined behavior if:
+/// **In Rust versions before 1.45.0**, some uses of the `as` operator were not entirely safe.
+/// In particular, it was undefined behavior if:
 ///
 /// - A truncated floating point value cannot fit in the target integer
 ///   type ([#10184](https://github.com/rust-lang/rust/issues/10184));