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

Rollup of 10 pull requests #40693

Merged
merged 33 commits into from
Mar 21, 2017
Merged
Changes from 2 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
e2b4824
Removed RustFMT changes
jdhorwitz Mar 8, 2017
6a2ef9a
clean up visuals on error index #40425
jdhorwitz Mar 14, 2017
28626ca
Stabilize pub(restricted)
cramertj Mar 15, 2017
e9c07cf
fix typo in mir TerminatorKind docs
Mar 16, 2017
60c1c96
Make priv in pub hard error for crates using pub(restricted)
cramertj Mar 18, 2017
fc04eaa
Implement ? in catch expressions and add tests
cramertj Feb 28, 2017
1f43731
Add more catch-related CFG and lifetime tests and fix CFG bug
cramertj Mar 14, 2017
c50a6ec
Fix typo in `ptr` doc
DaseinPhaos Mar 20, 2017
17a26ee
Add missing urls in Option enum
GuillaumeGomez Mar 20, 2017
e4628fb
Remove the existing book
steveklabnik Mar 7, 2017
f17965d
Import submodule for the book.
steveklabnik Mar 7, 2017
8573a13
build both editions of the book
steveklabnik Mar 7, 2017
5f2f3d0
build book index
steveklabnik Mar 7, 2017
422330d
Render redirect pages.
steveklabnik Mar 7, 2017
c97b48f
Fix up some issues.
steveklabnik Mar 7, 2017
966e721
fix whitespace
steveklabnik Mar 7, 2017
2330459
skip nostarch directory
steveklabnik Mar 13, 2017
c0e7b16
Update book and reference submodules
steveklabnik Mar 14, 2017
d1d9626
Fix up various links
steveklabnik Mar 15, 2017
4eef581
exempt hbs from linkchecker
steveklabnik Mar 15, 2017
96d3594
fix trailing whitespace
steveklabnik Mar 17, 2017
aa83d71
config.toml.example: nightlies.txt got removed
est31 Mar 20, 2017
1a00c8f
Add missing associated type Item to Iterator
portal-chan Mar 20, 2017
fcc2d25
Rollup merge of #40229 - cramertj:break-to-blocks, r=nikomatsakis
frewsxcv Mar 21, 2017
42cfdc1
Rollup merge of #40312 - jdhorwitz:papercut, r=steveklabnik
frewsxcv Mar 21, 2017
14b5d56
Rollup merge of #40332 - steveklabnik:extract-book, r=alexcrichton
frewsxcv Mar 21, 2017
03235cc
Rollup merge of #40502 - jdhorwitz:master, r=steveklabnik
frewsxcv Mar 21, 2017
17656ab
Rollup merge of #40556 - cramertj:stabilize-pub-restricted, r=petroch…
frewsxcv Mar 21, 2017
2532ad7
Rollup merge of #40576 - dwrensha:mir-terminator-kind-doc-typo, r=nik…
frewsxcv Mar 21, 2017
d0c04fb
Rollup merge of #40667 - DaseinPhaos:patch-4, r=GuillaumeGomez
frewsxcv Mar 21, 2017
bf3f77b
Rollup merge of #40671 - GuillaumeGomez:options-urls, r=frewsxcv
frewsxcv Mar 21, 2017
c6b2110
Rollup merge of #40681 - est31:nightlies_txt_was_removed, r=alexcrichton
frewsxcv Mar 21, 2017
b6240e5
Rollup merge of #40685 - portal-chan:patch-1, r=eddyb
frewsxcv Mar 21, 2017
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
17 changes: 13 additions & 4 deletions src/libcore/option.rs
Original file line number Diff line number Diff line change
@@ -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());
@@ -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
///
/// ```
@@ -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
///
@@ -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!"));