Browse Source

update AsPrimitive Safety docs for rust 1.45

Martin Taibr 4 năm trước cách đây
mục cha
commit
7d26cecdab
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  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));