Rollup merge of #97364 - notriddle:continue-keyword, r=JohnTitor

Fix weird indentation in continue_keyword docs

This format was causing every line in the code examples to have a space at the start.
This commit is contained in:
Yuki Okushi 2022-05-25 07:08:45 +09:00 committed by GitHub
commit c3fea09208
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,7 +70,7 @@ mod as_keyword {}
/// A break expression is normally associated with the innermost loop enclosing the /// A break expression is normally associated with the innermost loop enclosing the
/// `break` but a label can be used to specify which enclosing loop is affected. /// `break` but a label can be used to specify which enclosing loop is affected.
/// ///
///```rust /// ```rust
/// 'outer: for i in 1..=5 { /// 'outer: for i in 1..=5 {
/// println!("outer iteration (i): {i}"); /// println!("outer iteration (i): {i}");
/// ///
@ -87,7 +87,7 @@ mod as_keyword {}
/// } /// }
/// } /// }
/// println!("Bye."); /// println!("Bye.");
///``` /// ```
/// ///
/// When associated with `loop`, a break expression may be used to return a value from that loop. /// When associated with `loop`, a break expression may be used to return a value from that loop.
/// This is only valid with `loop` and not with any other type of loop. /// This is only valid with `loop` and not with any other type of loop.
@ -194,7 +194,7 @@ mod const_keyword {}
/// When `continue` is encountered, the current iteration is terminated, returning control to the /// When `continue` is encountered, the current iteration is terminated, returning control to the
/// loop head, typically continuing with the next iteration. /// loop head, typically continuing with the next iteration.
/// ///
///```rust /// ```rust
/// // Printing odd numbers by skipping even ones /// // Printing odd numbers by skipping even ones
/// for number in 1..=10 { /// for number in 1..=10 {
/// if number % 2 == 0 { /// if number % 2 == 0 {
@ -202,12 +202,12 @@ mod const_keyword {}
/// } /// }
/// println!("{number}"); /// println!("{number}");
/// } /// }
///``` /// ```
/// ///
/// Like `break`, `continue` is normally associated with the innermost enclosing loop, but labels /// Like `break`, `continue` is normally associated with the innermost enclosing loop, but labels
/// may be used to specify the affected loop. /// may be used to specify the affected loop.
/// ///
///```rust /// ```rust
/// // Print Odd numbers under 30 with unit <= 5 /// // Print Odd numbers under 30 with unit <= 5
/// 'tens: for ten in 0..3 { /// 'tens: for ten in 0..3 {
/// '_units: for unit in 0..=9 { /// '_units: for unit in 0..=9 {
@ -220,7 +220,7 @@ mod const_keyword {}
/// println!("{}", ten * 10 + unit); /// println!("{}", ten * 10 + unit);
/// } /// }
/// } /// }
///``` /// ```
/// ///
/// See [continue expressions] from the reference for more details. /// See [continue expressions] from the reference for more details.
/// ///