Skip to content

Commit

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

Rollup of 10 pull requests

Successful merges:

 - rust-lang#120696 (Properly handle `async` block and `async fn` in `if` exprs without `else`)
 - rust-lang#120751 (Provide more suggestions on invalid equality where bounds)
 - rust-lang#120802 (Bail out of drop elaboration when encountering error types)
 - rust-lang#120967 (docs: mention round-to-even in precision formatting)
 - rust-lang#120973 (allow static_mut_ref in some tests that specifically test mutable statics)
 - rust-lang#120974 (llvm-wrapper: adapt for LLVM API change: Add support for EXPORTAS name types)
 - rust-lang#120986 (iterator.rs: remove "Basic usage" text)
 - rust-lang#120987 (remove redundant logic)
 - rust-lang#120988 (fix comment)
 - rust-lang#120995 (PassWrapper: adapt for llvm/llvm-project@93cdd1b5cfa3735c)

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed Feb 13, 2024
2 parents 0fa295a + 821af2b commit 0b5ada2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 40 deletions.
16 changes: 16 additions & 0 deletions alloc/src/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,22 @@
//! Hello, ` 123` has 3 right-aligned characters
//! ```
//!
//! When truncating these values, Rust uses [round half-to-even](https://en.wikipedia.org/wiki/Rounding#Rounding_half_to_even),
//! which is the default rounding mode in IEEE 754.
//! For example,
//!
//! ```
//! print!("{0:.1$e}", 12345, 3);
//! print!("{0:.1$e}", 12355, 3);
//! ```
//!
//! Would return:
//!
//! ```text
//! 1.234e4
//! 1.236e4
//! ```
//!
//! ## Localization
//!
//! In some programming languages, the behavior of string formatting functions
Expand Down
40 changes: 0 additions & 40 deletions core/src/iter/traits/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ pub trait Iterator {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let a = [1, 2, 3];
///
Expand Down Expand Up @@ -249,8 +247,6 @@ pub trait Iterator {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let a = [1, 2, 3];
/// assert_eq!(a.iter().count(), 3);
Expand Down Expand Up @@ -280,8 +276,6 @@ pub trait Iterator {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let a = [1, 2, 3];
/// assert_eq!(a.iter().last(), Some(&3));
Expand Down Expand Up @@ -324,8 +318,6 @@ pub trait Iterator {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(iter_advance_by)]
///
Expand Down Expand Up @@ -432,8 +424,6 @@ pub trait Iterator {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let a = [0, 1, 2, 3, 4, 5];
/// let mut iter = a.iter().step_by(2);
Expand Down Expand Up @@ -1342,8 +1332,6 @@ pub trait Iterator {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let a = [1, 2, 3];
///
Expand Down Expand Up @@ -1434,8 +1422,6 @@ pub trait Iterator {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let a = [1, 2, 3, 4];
///
Expand Down Expand Up @@ -1486,8 +1472,6 @@ pub trait Iterator {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let words = ["alpha", "beta", "gamma"];
///
Expand Down Expand Up @@ -1765,8 +1749,6 @@ pub trait Iterator {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// // an iterator which alternates between Some and None
/// struct Alternate {
Expand Down Expand Up @@ -1911,8 +1893,6 @@ pub trait Iterator {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let mut words = ["hello", "world", "of", "Rust"].into_iter();
///
Expand Down Expand Up @@ -2221,8 +2201,6 @@ pub trait Iterator {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let a = [1, 2, 3];
///
Expand Down Expand Up @@ -3193,8 +3171,6 @@ pub trait Iterator {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let a = [1, 2, 3];
/// let b: Vec<u32> = Vec::new();
Expand Down Expand Up @@ -3232,8 +3208,6 @@ pub trait Iterator {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let a = [1, 2, 3];
/// let b: Vec<u32> = Vec::new();
Expand Down Expand Up @@ -3420,8 +3394,6 @@ pub trait Iterator {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let a = [(1, 2), (3, 4), (5, 6)];
///
Expand Down Expand Up @@ -3458,8 +3430,6 @@ pub trait Iterator {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let a = [1, 2, 3];
///
Expand Down Expand Up @@ -3538,8 +3508,6 @@ pub trait Iterator {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let a = [1, 2, 3];
///
Expand Down Expand Up @@ -3624,8 +3592,6 @@ pub trait Iterator {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let a = [1, 2, 3];
/// let sum: i32 = a.iter().sum();
Expand Down Expand Up @@ -3703,8 +3669,6 @@ pub trait Iterator {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(iter_order_by)]
///
Expand Down Expand Up @@ -3790,8 +3754,6 @@ pub trait Iterator {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(iter_order_by)]
///
Expand Down Expand Up @@ -3863,8 +3825,6 @@ pub trait Iterator {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(iter_order_by)]
///
Expand Down

0 comments on commit 0b5ada2

Please sign in to comment.