Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix documentation surrounding the in and for keywords #74536

Merged
merged 4 commits into from
Jul 20, 2020
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/libstd/keyword_docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -473,8 +473,8 @@ mod fn_keyword {}
/// * `for` is also used for [higher-ranked trait bounds] as in `for<'a> &'a T: PartialEq<i32>`.
///
/// for-in-loops, or to be more precise, iterator loops, are a simple syntactic sugar over a common
/// practice within Rust, which is to loop over an iterator until that iterator returns `None` (or
/// `break` is called).
/// practice within Rust, which is to loop over anything that implements [`IntoIterator`] until the
/// temporary iterator returns `None` (or `break` is called).
Nicholas-Baron marked this conversation as resolved.
Show resolved Hide resolved
///
/// ```rust
/// for i in 0..5 {
Expand Down Expand Up @@ -680,7 +680,7 @@ mod impl_keyword {}
//
/// Iterate over a series of values with [`for`].
///
/// The expression immediately following `in` must implement the [`Iterator`] trait.
/// The expression immediately following `in` must implement the [`IntoIterator`] trait.
///
/// ## Literal Examples:
///
Expand All @@ -689,7 +689,7 @@ mod impl_keyword {}
///
/// (Read more about [range patterns])
///
/// [`Iterator`]: ../book/ch13-04-performance.html
/// [`IntoIterator`]: ../book/ch13-04-performance.html
/// [range patterns]: ../reference/patterns.html?highlight=range#range-patterns
/// [`for`]: keyword.for.html
mod in_keyword {}
Expand Down