Skip to content

Commit

Permalink
Update doc about UB in 'as' casts; Mention #59
Browse files Browse the repository at this point in the history
  • Loading branch information
yoanlcq committed Jul 29, 2020
1 parent 379cadc commit d439258
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
15 changes: 6 additions & 9 deletions src/mat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1522,9 +1522,8 @@ macro_rules! mat_impl_mat4 {
///
/// # Safety
///
/// As stated by the `AsPrimitive` trait documentation:
/// 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));
Expand Down Expand Up @@ -3288,9 +3287,8 @@ macro_rules! mat_impl_mat3 {
///
/// # Safety
///
/// As stated by the `AsPrimitive` trait documentation:
/// 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));
Expand Down Expand Up @@ -3812,9 +3810,8 @@ macro_rules! mat_impl_mat2 {
///
/// # Safety
///
/// As stated by the `AsPrimitive` trait documentation:
/// 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));
Expand Down
5 changes: 2 additions & 3 deletions src/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -579,9 +579,8 @@ macro_rules! vec_impl_vec {
///
/// # Safety
///
/// As stated by the `AsPrimitive` trait documentation:
/// 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));
Expand Down

0 comments on commit d439258

Please sign in to comment.