Skip to content

Commit

Permalink
Auto merge of rust-lang#119671 - matthiaskrgr:rollup-13vxv34, r=matth…
Browse files Browse the repository at this point in the history
…iaskrgr

Rollup of 3 pull requests

Successful merges:

 - rust-lang#119654 (bump bootstrap dependencies)
 - rust-lang#119656 (document rounding behavior of rint/nearbyint for ties)
 - rust-lang#119657 (Fix typo in docs for slice::split_once, slice::rsplit_once)

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed Jan 6, 2024
2 parents b6a8c76 + c6a7dce commit 9d623d2
Show file tree
Hide file tree
Showing 5 changed files with 160 additions and 186 deletions.
18 changes: 12 additions & 6 deletions library/core/src/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1783,27 +1783,33 @@ extern "rust-intrinsic" {
#[rustc_nounwind]
pub fn truncf64(x: f64) -> f64;

/// Returns the nearest integer to an `f32`. May raise an inexact floating-point exception
/// if the argument is not an integer.
/// Returns the nearest integer to an `f32`. Changing the rounding mode is not possible in Rust,
/// so this rounds half-way cases to the number with an even least significant digit.
///
/// May raise an inexact floating-point exception if the argument is not an integer.
///
/// The stabilized version of this intrinsic is
/// [`f32::round_ties_even`](../../std/primitive.f32.html#method.round_ties_even)
#[rustc_nounwind]
pub fn rintf32(x: f32) -> f32;
/// Returns the nearest integer to an `f64`. May raise an inexact floating-point exception
/// if the argument is not an integer.
/// Returns the nearest integer to an `f64`. Changing the rounding mode is not possible in Rust,
/// so this rounds half-way cases to the number with an even least significant digit.
///
/// May raise an inexact floating-point exception if the argument is not an integer.
///
/// The stabilized version of this intrinsic is
/// [`f64::round_ties_even`](../../std/primitive.f64.html#method.round_ties_even)
#[rustc_nounwind]
pub fn rintf64(x: f64) -> f64;

/// Returns the nearest integer to an `f32`.
/// Returns the nearest integer to an `f32`. Changing the rounding mode is not possible in Rust,
/// so this rounds half-way cases to the number with an even least significant digit.
///
/// This intrinsic does not have a stable counterpart.
#[rustc_nounwind]
pub fn nearbyintf32(x: f32) -> f32;
/// Returns the nearest integer to an `f64`.
/// Returns the nearest integer to an `f64`. Changing the rounding mode is not possible in Rust,
/// so this rounds half-way cases to the number with an even least significant digit.
///
/// This intrinsic does not have a stable counterpart.
#[rustc_nounwind]
Expand Down
4 changes: 2 additions & 2 deletions library/core/src/slice/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2483,7 +2483,7 @@ impl<T> [T] {
/// Splits the slice on the first element that matches the specified
/// predicate.
///
/// If any matching elements are resent in the slice, returns the prefix
/// If any matching elements are present in the slice, returns the prefix
/// before the match and suffix after. The matching element itself is not
/// included. If no elements match, returns `None`.
///
Expand Down Expand Up @@ -2511,7 +2511,7 @@ impl<T> [T] {
/// Splits the slice on the last element that matches the specified
/// predicate.
///
/// If any matching elements are resent in the slice, returns the prefix
/// If any matching elements are present in the slice, returns the prefix
/// before the match and suffix after. The matching element itself is not
/// included. If no elements match, returns `None`.
///
Expand Down
Loading

0 comments on commit 9d623d2

Please sign in to comment.