Skip to content

Commit

Permalink
Rollup merge of rust-lang#40671 - GuillaumeGomez:options-urls, r=frew…
Browse files Browse the repository at this point in the history
…sxcv

Add missing urls in Option enum

r? @rust-lang/docs
  • Loading branch information
frewsxcv committed Mar 21, 2017
2 parents d0c04fb + 17a26ee commit bf3f77b
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/libcore/option.rs
Expand Up @@ -219,12 +219,14 @@ impl<T> Option<T> {
///
/// # Examples
///
/// Convert an `Option<String>` into an `Option<usize>`, preserving the original.
/// Convert an `Option<`[`String`]`>` into an `Option<`[`usize`]`>`, preserving the original.
/// The [`map`] method takes the `self` argument by value, consuming the original,
/// so this technique uses `as_ref` to first take an `Option` to a reference
/// to the value inside the original.
///
/// [`map`]: enum.Option.html#method.map
/// [`String`]: ../../std/string/struct.String.html
/// [`usize`]: ../../std/primitive.usize.html
///
/// ```
/// let num_as_str: Option<String> = Some("10".to_string());
Expand Down Expand Up @@ -271,9 +273,11 @@ impl<T> Option<T> {
///
/// # Panics
///
/// Panics if the value is a `None` with a custom panic message provided by
/// Panics if the value is a [`None`] with a custom panic message provided by
/// `msg`.
///
/// [`None`]: #variant.None
///
/// # Examples
///
/// ```
Expand Down Expand Up @@ -302,7 +306,9 @@ impl<T> Option<T> {
///
/// # Panics
///
/// Panics if the self value equals `None`.
/// Panics if the self value equals [`None`].
///
/// [`None`]: #variant.None
///
/// # Examples
///
Expand Down Expand Up @@ -367,7 +373,10 @@ impl<T> Option<T> {
///
/// # Examples
///
/// Convert an `Option<String>` into an `Option<usize>`, consuming the original:
/// Convert an `Option<`[`String`]`>` into an `Option<`[`usize`]`>`, consuming the original:
///
/// [`String`]: ../../std/string/struct.String.html
/// [`usize`]: ../../std/primitive.usize.html
///
/// ```
/// let maybe_some_string = Some(String::from("Hello, World!"));
Expand Down

0 comments on commit bf3f77b

Please sign in to comment.