about summary refs log tree commit diff
path: root/src/doc/rustdoc
AgeCommit message (Collapse)AuthorLines
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
2018-04-17Rollup merge of #49994 - frewsxcv:frewsxcv-doc-tests, r=QuietMisdreavuskennytm-19/+19
Remove unnecessary indentation in rustdoc book codeblock. None
2018-04-16Remove unnecessary indentation in rustdoc book codeblock.Corey Farwell-19/+19
2018-04-13add -C to the rustdoc bookQuietMisdreavus-0/+25
2018-04-01Rollup merge of #49451 - QuietMisdreavus:epoch-doctests, r=GuillaumeGomezMark Simulacrum-0/+13
rustdoc: add an --edition flag to compile docs/doctests with a certain edition To correspond with the 2018 edition, this adds a (currently unstable) `--edition` flag to rustdoc that makes it compile crates and doctests with the given edition. Once this lands, Cargo should be updated to pass this flag when the edition configuration option is given.
2018-03-29Rename main theme into light themeGuillaume Gomez-3/+3
2018-03-27talk about --edition in the Rustdoc BookQuietMisdreavus-0/+13
2018-03-23Rollup merge of #49028 - ↵Alex Crichton-0/+363
QuietMisdreavus:the-dark-forbidden-corners-of-rustdoc, r=frewsxcv add an "unstable features" chapter to the rustdoc book There are several rustdoc features that currently are undocumented, but also don't fit with the rest of the Rustdoc Book since they're also unstable. Some of these have corresponding feature gates and chapters in the Unstable Book, but many don't, and i wanted a place to talk about them officially. Goal: talk about everything rustdoc can do that needs nightly - [x] Feature gates (extensions to the doc attribute that can be caught by the compiler) - [x] doc(cfg) - [x] doc(masked) - [x] doc(spotlight) - [x] doc(include) - [x] Command-line flags (features that require a CLI flag to use, where the flag itself is a `-Z` command or otherwise requires `-Z unstable-options` before rustdoc will accept it) - [x] markdown-before-content/markdown-after-content - [x] playground-url - [x] display-warnings - [x] crate-version - [x] linker - [x] sort-modules-by-appearance - [x] themes/theme-checker - [x] resource-suffix - [x] `-Z force-unstable-if-unmarked` - [x] Nightly-gated functionality (features that are gated by requiring a nightly build without needing a CLI flag or a feature gate to unlock) - [x] intra-links - [x] error numbers for `compile_fail` doctests
2018-03-21review commentsQuietMisdreavus-11/+13
2018-03-20talk about force-unstable-if-unmarkedQuietMisdreavus-0/+13
2018-03-20talk about --display-warningsQuietMisdreavus-0/+16
2018-03-16talk about --resource-suffixQuietMisdreavus-0/+13
2018-03-16talk about --themes and --theme-checkerQuietMisdreavus-0/+24
2018-03-16talk about --sort-modules-by-appearanceQuietMisdreavus-0/+13
2018-03-16talk about --linkerQuietMisdreavus-0/+13
2018-03-16talk about --crate-versionQuietMisdreavus-0/+12