Skip to content

Commit 9d623d2

Browse files
committed
Auto merge of #119671 - matthiaskrgr:rollup-13vxv34, r=matthiaskrgr
Rollup of 3 pull requests Successful merges: - #119654 (bump bootstrap dependencies) - #119656 (document rounding behavior of rint/nearbyint for ties) - #119657 (Fix typo in docs for slice::split_once, slice::rsplit_once) r? `@ghost` `@rustbot` modify labels: rollup
2 parents b6a8c76 + c6a7dce commit 9d623d2

File tree

5 files changed

+160
-186
lines changed

5 files changed

+160
-186
lines changed

library/core/src/intrinsics.rs

+12-6
Original file line numberDiff line numberDiff line change
@@ -1783,27 +1783,33 @@ extern "rust-intrinsic" {
17831783
#[rustc_nounwind]
17841784
pub fn truncf64(x: f64) -> f64;
17851785

1786-
/// Returns the nearest integer to an `f32`. May raise an inexact floating-point exception
1787-
/// if the argument is not an integer.
1786+
/// Returns the nearest integer to an `f32`. Changing the rounding mode is not possible in Rust,
1787+
/// so this rounds half-way cases to the number with an even least significant digit.
1788+
///
1789+
/// May raise an inexact floating-point exception if the argument is not an integer.
17881790
///
17891791
/// The stabilized version of this intrinsic is
17901792
/// [`f32::round_ties_even`](../../std/primitive.f32.html#method.round_ties_even)
17911793
#[rustc_nounwind]
17921794
pub fn rintf32(x: f32) -> f32;
1793-
/// Returns the nearest integer to an `f64`. May raise an inexact floating-point exception
1794-
/// if the argument is not an integer.
1795+
/// Returns the nearest integer to an `f64`. Changing the rounding mode is not possible in Rust,
1796+
/// so this rounds half-way cases to the number with an even least significant digit.
1797+
///
1798+
/// May raise an inexact floating-point exception if the argument is not an integer.
17951799
///
17961800
/// The stabilized version of this intrinsic is
17971801
/// [`f64::round_ties_even`](../../std/primitive.f64.html#method.round_ties_even)
17981802
#[rustc_nounwind]
17991803
pub fn rintf64(x: f64) -> f64;
18001804

1801-
/// Returns the nearest integer to an `f32`.
1805+
/// Returns the nearest integer to an `f32`. Changing the rounding mode is not possible in Rust,
1806+
/// so this rounds half-way cases to the number with an even least significant digit.
18021807
///
18031808
/// This intrinsic does not have a stable counterpart.
18041809
#[rustc_nounwind]
18051810
pub fn nearbyintf32(x: f32) -> f32;
1806-
/// Returns the nearest integer to an `f64`.
1811+
/// Returns the nearest integer to an `f64`. Changing the rounding mode is not possible in Rust,
1812+
/// so this rounds half-way cases to the number with an even least significant digit.
18071813
///
18081814
/// This intrinsic does not have a stable counterpart.
18091815
#[rustc_nounwind]

library/core/src/slice/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2483,7 +2483,7 @@ impl<T> [T] {
24832483
/// Splits the slice on the first element that matches the specified
24842484
/// predicate.
24852485
///
2486-
/// If any matching elements are resent in the slice, returns the prefix
2486+
/// If any matching elements are present in the slice, returns the prefix
24872487
/// before the match and suffix after. The matching element itself is not
24882488
/// included. If no elements match, returns `None`.
24892489
///
@@ -2511,7 +2511,7 @@ impl<T> [T] {
25112511
/// Splits the slice on the last element that matches the specified
25122512
/// predicate.
25132513
///
2514-
/// If any matching elements are resent in the slice, returns the prefix
2514+
/// If any matching elements are present in the slice, returns the prefix
25152515
/// before the match and suffix after. The matching element itself is not
25162516
/// included. If no elements match, returns `None`.
25172517
///

0 commit comments

Comments
 (0)