]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #26073 - chuckSMASH:trpl-5-4-comments, r=steveklabnik
authorManish Goregaokar <manishsmail@gmail.com>
Tue, 9 Jun 2015 00:12:27 +0000 (05:42 +0530)
committerManish Goregaokar <manishsmail@gmail.com>
Tue, 9 Jun 2015 00:12:27 +0000 (05:42 +0530)
commit554f595b864a9dc333fa8bb42c3e0a04b0b3e48a
treedfd4fc58c20577a48f0729bbe76962dfa56ae23d
parenta387078c62531e144b06d160475310fe9ce5d5f9
parent675b3decadc149b400d9afc4c59e0703a0b100ff
Rollup merge of #26073 - chuckSMASH:trpl-5-4-comments, r=steveklabnik

For a user following the path of reading Chapter 5: Syntax & Symantics
prior to Chapter 4: Learn Rust, this will be the first time they have
encountered executable tests inside documentation comments.

The test will fail because the `add_one` function is not defined in
the context of the doctest. This might not be the optimal place to
introduce and explain the `/// #` notation but I think it is important
that this snippet pass as a test when `rustdoc --test` is run against
it.