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

Remove incorrect Default::default links, add a new one #47497

Merged
merged 1 commit into from
Jan 17, 2018
Merged
Changes from all 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
11 changes: 4 additions & 7 deletions src/libcore/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,7 @@ impl<T> Option<T> {
}

/// Applies a function to the contained value (if any),
/// or returns a [`default`][] (if not).
///
/// [`default`]: ../default/trait.Default.html#tymethod.default
/// or returns the provided default (if not).
///
/// # Examples
///
Expand All @@ -430,9 +428,7 @@ impl<T> Option<T> {
}

/// Applies a function to the contained value (if any),
/// or computes a [`default`][] (if not).
///
/// [`default`]: ../default/trait.Default.html#tymethod.default
/// or computes a default (if not).
///
/// # Examples
///
Expand Down Expand Up @@ -850,7 +846,7 @@ impl<T: Default> Option<T> {
/// Returns the contained value or a default
///
/// Consumes the `self` argument then, if [`Some`], returns the contained
/// value, otherwise if [`None`], returns the default value for that
/// value, otherwise if [`None`], returns the [default value] for that
/// type.
///
/// # Examples
Expand All @@ -872,6 +868,7 @@ impl<T: Default> Option<T> {
///
/// [`Some`]: #variant.Some
/// [`None`]: #variant.None
/// [default value]: ../default/trait.Default.html#tymethod.default
/// [`parse`]: ../../std/primitive.str.html#method.parse
/// [`FromStr`]: ../../std/str/trait.FromStr.html
#[inline]
Expand Down