diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2019-07-01 16:41:37 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2019-07-01 16:41:37 +0200 |
| commit | a683bb175468354a4ebec51667fec8c3d467240f (patch) | |
| tree | 5afe2f6f3065cab01a7a1b9e65dba25bddaf85f5 /src/doc/rustdoc | |
| parent | 765eebf064ae17347f3532791760fc5c2150b5ea (diff) | |
| download | rust-a683bb175468354a4ebec51667fec8c3d467240f.tar.gz rust-a683bb175468354a4ebec51667fec8c3d467240f.zip | |
Revert "implicit `Option`-returning doctests"
This reverts commit 6bb6c001be34d0932a014df981ee18f165c43374.
Diffstat (limited to 'src/doc/rustdoc')
| -rw-r--r-- | src/doc/rustdoc/src/documentation-tests.md | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/doc/rustdoc/src/documentation-tests.md b/src/doc/rustdoc/src/documentation-tests.md index a896ce819ae..c9acd3c307b 100644 --- a/src/doc/rustdoc/src/documentation-tests.md +++ b/src/doc/rustdoc/src/documentation-tests.md @@ -253,19 +253,6 @@ conversion, so type inference fails because the type is not unique. Please note that you must write the `(())` in one sequence without intermediate whitespace so that rustdoc understands you want an implicit `Result`-returning function. -As of version 1.37.0, this simplification also works with `Option`s, which can -be handy to test e.g. iterators or checked arithmetic, for example: - -```ignore -/// ``` -/// let _ = &[].iter().next()?; -///# Some(()) -/// ``` -``` - -Note that the result must be a `Some(())` and this has to be written in one go. -In this case disambiguating the result isn't required. - ## Documenting macros Here’s an example of documenting a macro: |
