File tree 1 file changed +22
-0
lines changed
1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -558,6 +558,28 @@ mod impl_keyword { }
558
558
/// [Reference]: ../reference/statements.html#let-statements
559
559
mod let_keyword { }
560
560
561
+ #[ doc( keyword = "while" ) ]
562
+ //
563
+ /// while loop
564
+ ///
565
+ /// `while` is used to define while loops in Rust. It runs the code inside it
566
+ /// until the condition in the while loop becomes False or there the code uses
567
+ /// `break`.
568
+ ///
569
+ ///
570
+ /// ```rust
571
+ /// let mut i = 0;
572
+ /// while i > 10 {
573
+ /// println!("i is {}", i);
574
+ /// i += 1;
575
+ /// }
576
+ /// ```
577
+ ///
578
+ /// For more information on `while` and loops in general, see the [Reference].
579
+ ///
580
+ /// [Reference]: ../reference/expressions/loop-expr.html
581
+ mod while_keyword { }
582
+
561
583
#[ doc( keyword = "loop" ) ]
562
584
//
563
585
/// The loop-defining keyword.
You can’t perform that action at this time.
0 commit comments