about summary refs log tree commit diff
path: root/src/doc/rustdoc
AgeCommit message (Collapse)AuthorLines
2019-10-29Update since version for doctest featureGuillaume Gomez-1/+1
2019-10-29improve documentation of rustdoc doctest featureGuillaume Gomez-7/+22
2019-10-29stabilize cfg(doctest)Guillaume Gomez-30/+31
2019-09-03added rustdoc book documentation, improved behavior when unstable flag not ↵Dario Gonzalez-0/+50
present
2019-09-01remove the unstable rustdoc parameter --linkerAndreas Jonson-13/+0
use the code generation parameter -Clinker (same parameter as rustc) to control what linker to use for building the rustdoc test executables. closes: #63816
2019-07-23Adjust docs to new #[doc(include)] behaviourJonas Schievink-3/+2
2019-07-06rustdoc: set cfg(doctest) when collecting doctestsQuietMisdreavus-0/+30
2019-07-01Revert "implicit `Option`-returning doctests"Guillaume Gomez-13/+0
This reverts commit 6bb6c001be34d0932a014df981ee18f165c43374.
2019-05-31Rollup merge of #61372 - mati865:books, r=Centril,GuillaumeGomezPietro Albini-6/+6
Migrate some books to mdbook version 0.2 There are 3 books still using old version but they need more effort so I hope to do them in subsequent PR if I find the time.
2019-05-30Migrate rustdoc book to MdBook2Mateusz Mikuła-6/+6
2019-05-28implicit `Option`-returning doctestsAndre Bogus-0/+13
This distinguishes `Option` and `Result`-returning doctests with implicit `main` method, where the former tests must end with `Some(())`.
2019-05-26docs: fix typo #61197airt-1/+1
2019-05-16Rollup merge of #60278 - ehuss:doc-html_root_url, r=GuillaumeGomezManish Goregaokar-0/+15
Document the `html_root_url` doc attribute value. I'm not sure if this was intentionally not documented, but I think it would be good to include. This was added in #9691. `--extern-html-root-url` is unstable, but I don't think it hurts to mention it.
2019-04-25Document the `html_root_url` doc attribute value.Eric Huss-0/+15
2019-04-23Outdent example, preserving nested fenceFelix Rabe-10/+10
2019-02-28tweak docs for rustdoc's `--show-coverage`QuietMisdreavus-4/+8
2019-02-28update docs for doc coverageQuietMisdreavus-2/+4
2019-02-28tabs -> spacesQuietMisdreavus-4/+4
2019-02-28add option to calculate documentation coverageQuietMisdreavus-0/+21
2019-02-20fix typoAndre Bogus-1/+1
2019-02-20Rollup merge of #56470 - llogiq:process-termination-doctest, r=GuillaumeGomezkennytm-0/+17
Modify doctest's auto-`fn main()` to allow `Result`s This lets the default `fn main()` ~~return `impl Termination`~~ unwrap Results, which allows the use of `?` in most tests without adding it manually. This fixes #56260 ~~Blocked on `std::process::Termination` stabilization.~~ Using `Termination` would have been cleaner, but this should work OK.
2019-02-17Modify doctest's auto-`fn main()` to allow `Result`sAndre Bogus-0/+17
This lets the default `fn main()` unwrap any `Result`s, which allows the use of `?` in most tests without adding it manually.
2019-02-09Some writing improvement, conciseness of introRobert Hayek-4/+3
2019-01-17Bless test.Wesley Norris-1/+9
Bless test, remove submodule, and fix book entry. bless test again? maybe it'll work this time...
2019-01-17Add book section and fix typo.Wesley Norris-0/+4
2019-01-03Fix repeated word typosWiktor Kuchta-1/+1
Found with `git grep -P '\b([a-z]+)\s+\1\b'`
2018-12-20new --static-root-path flag for controlling static file locationsQuietMisdreavus-0/+15
2018-11-09don't inline `pub use some_crate` unless directly asked toQuietMisdreavus-0/+3
2018-11-02Move doc_alias docGuillaume Gomez-16/+16
2018-11-02Add documentation for index-page featuresGuillaume Gomez-0/+13
2018-09-20Add documentation about the edition flagPhilip Munksgaard-0/+16
2018-09-09Stabilize the 2018 editionMark Rousskov-13/+14
2018-09-01Rollup merge of #53076 - QuietMisdreavus:cfg-rustdoc, r=GuillaumeGomezkennytm-11/+9
set cfg(rustdoc) when rustdoc is running on a crate When using `#[doc(cfg)]` to document platform-specific items, it's a little cumbersome to get all the platforms' items to appear all at once. For example, the standard library adds `--cfg dox` to rustdoc's command line whenever it builds docs, and the documentation for `#![feature(doc_cfg)]` suggests using a Cargo feature to approximate the same thing. This is a little awkward, because you always need to remember to set `--features dox` whenever you build documentation. This PR proposes making rustdoc set `#[cfg(rustdoc)]` whenever it runs on a crate, to provide an officially-sanctioned version of this that is set automatically. This way, there's a standardized way to declare that a certain version of an item is specifically when building docs. To try to prevent the spread of this feature from happening too quickly, this PR also restricts the use of this flag to whenever `#![feature(doc_cfg)]` is active. I'm sure there are other uses for this, but right now i'm tying it to this feature. (If it makes more sense to give this its own feature, i can easily do that.)
2018-08-31feature(doc_cfg): add docs for cfg(rustdoc)QuietMisdreavus-11/+9
2018-08-31Auto merge of #51384 - QuietMisdreavus:extern-version, r=GuillaumeGomezbors-0/+15
rustdoc: add flag to control the html_root_url of dependencies The `--extern-html-root-url` flag in this PR allows one to override links to crates whose docs are not already available locally in the doc bundle. Docs.rs currently uses a version of this to make sure links to other crates go into that crate's docs.rs page. See the included test for intended use, but the idea is as follows: Calling rustdoc with `--extern-html-root-url crate=https://some-url.com` will cause rustdoc to override links that point to that crate to instead be replaced with a link rooted at `https://some-url.com/`. (e.g. for docs.rs this would be `https://docs.rs/crate/0.1.0` or the like.) Cheekily, rustup could use these options to redirect links to std/core/etc to instead point to locally-downloaded docs, if it so desired. Fixes https://github.com/rust-lang/rust/issues/19603
2018-08-19Fix typos found by codespell.Matthias Krüger-1/+1
2018-07-18Fix links in rustdoc book.Eric Huss-2/+2
Due to a change in how mdbook generates section anchors, headers with non-alphabetic characters now start with "a".
2018-07-04rustdoc book on codeblock hash escapingLucas Morales-0/+17
2018-06-22Rollup merge of #51158 - ogham:patch-1, r=steveklabnikkennytm-0/+24
Mention spec and indented blocks in doctest docs Fixes #49717. This commit adds a new section to the Documentation Test docs, which briefly mentions indented code blocks, and links to the CommonMark specification for both. I’m not sure about saying "fenced code blocks the more popular choice in the Rust community” because it seems like I’m speaking for everyone, but I can’t think of a better way to phrase it!
2018-06-12rustdoc: add --extern-html-root-url flagQuietMisdreavus-0/+15
2018-06-05Rollup merge of #51183 - teiesti:rustdoc-book-termination, r=steveklabnikMark Simulacrum-11/+30
Update rustdoc book to suggest using Termination trait instead of hidden ‘foo’ function Closes #50721. I suggest that someone double-checks my English since I am not a native speaker. r? @steveklabnik
2018-06-05Rollup merge of #50852 - mandeep:fix-rustdoc-example-testing, r=GuillaumeGomezMark Simulacrum-2/+4
Add doc comment to hiding portions of code example fixes #50816 Not sure if this is all that's needed, but I think it's a good start. One thing to note is that the code block is a text block where it could possibly be a rust block.
2018-06-05Improve wordingTobias Stolzmann-2/+3
2018-06-05Update rustdoc book to suggest using Termination trait instead of hidden ↵Tobias Stolzmann-11/+29
‘foo’ function
2018-05-29Phrasing tweak in doctest docsBenjamin Sago-1/+1
2018-05-29Mention spec and indented blocks in doctest docsBenjamin Sago-0/+24
This commit adds a new section to the Documentation Test docs, which briefly mentions indented code blocks, and links to the CommonMark specification for both. I’m not sure about saying "fenced code blocks the more popular choice in the Rust community” because it seems like I’m speaking for everyone, but I can’t think of a better way to phrase it!
2018-05-18Add println statement to rendered code block examplemandeep-0/+1
2018-05-18Add doc comment to hiding portions of code examplemandeep-2/+3
Refactor hiding example to be more complete
2018-05-18Reorder description for snippets in rustdoc documentationRobin Krahl-8/+8
The example code snippets for the `no_run` and `compile_fail` attributes in the rustdoc documentation were followed by the description for the wrong attribute. This patch reorders the descriptions to match the code snippets.
2018-04-22Add doc about doc alias featureGuillaume Gomez-0/+16