summary refs log tree commit diff
path: root/src/doc/rustdoc
AgeCommit message (Collapse)AuthorLines
2023-05-25rustdoc book: document single tilde strikethroughLukas Markeffsky-3/+3
2023-04-29Add `rustdoc::unescaped_backtick` lintLukas Markeffsky-0/+38
2023-04-27Remove invalid value from scraped-examples.mdJohn Kelly-2/+2
2023-04-26Rollup merge of #110641 - GuillaumeGomez:rustdoc-in-doc-settings, r=notriddleMatthias Krüger-6/+66
Add new rustdoc book chapter to describe in-doc settings Fixes #55165. I continue going through old rustdoc issues. This one made a lot of sense so decided to add the missing chapter. r? ``@notriddle``
2023-04-26Rollup merge of #110418 - jsoref:spelling-rustdoc, r=jyn514jyn-5/+5
Spelling rustdoc Split per https://github.com/rust-lang/rust/pull/110392#issuecomment-1510148682
2023-04-22Add new rustdoc book chapter to describe in-doc settingsGuillaume Gomez-6/+66
2023-04-18Rollup merge of #110348 - ↵Matthias Krüger-3/+6
GuillaumeGomez:disambiguators-suffixes-rustdoc-book, r=Manishearth Add list of supported disambiguators and suffixes for intra-doc links in the rustdoc book This information is otherwise only provided in case an error occurs, which isn't great. r? ```@notriddle```
2023-04-17Add list of supported disambiguators and suffixes for intra-doc links in the ↵Guillaume Gomez-3/+6
rustdoc book
2023-04-16spelling: typographicalJosh Soref-1/+1
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-16spelling: githubJosh Soref-4/+4
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-15Auto merge of #109802 - notriddle:notriddle/rustdoc-search-generics-nested, ↵bors-0/+11
r=GuillaumeGomez rustdoc-search: add support for nested generics This change allows `search.js` to parse nested generics (which look `Like<This<Example>>`) and match them. It maintains the existing "bag semantics", so that the order of type parameters is ignored but the number is required to be greater than or equal to what's in the query. For example, a function with the signature `fn read_all(&mut self: impl Read) -> Result<Vec<u8>, Error>` will match these queries: * `Read -> Result<Vec<u8>, Error>` * `Read -> Result<Error, Vec>` * `Read -> Result<Vec<u8>>` But it *does not* match `Result<Vec, u8>` or `Result<u8<Vec>>`.
2023-04-14Update how-to-read-rustdoc.mdMichael Howell-0/+11
2023-04-14Rollup merge of #110328 - GuillaumeGomez:auto-disambiguation-proc-trait, ↵Matthias Krüger-0/+7
r=notriddle [rustdoc] Add explanations for auto-disambiguation when an intra doc link is resolved to a proc-macro and a trait at the same time Part of https://github.com/rust-lang/rust/issues/110111. r? `@notriddle`
2023-04-14Add explanations for auto-disambiguation when an intra doc link is resolved ↵Guillaume Gomez-0/+7
to a proc-macro and a trait at the same time
2023-04-14Rollup merge of #103682 - Swatinem:stable-run-directory, r=GuillaumeGomezYuki Okushi-1/+26
Stabilize rustdoc `--test-run-directory` This should resolve https://github.com/rust-lang/rust/issues/84674
2023-04-12Update rustdoc book content about `--extend-css` optionGuillaume Gomez-4/+1
2023-04-08Auto merge of #109767 - GuillaumeGomez:rm-mention-missing_doc_code_examples, ↵bors-3/+10
r=notriddle Remove mention of `missing_doc_code_examples` lint from rustdoc book Fixes https://github.com/rust-lang/rust/issues/109601. r? `@notriddle`
2023-03-31Stabilize rustdoc `--test-run-directory`Arpad Borsos-1/+26
2023-03-30Update documentation for rustc_doc_primitiveGuillaume Gomez-3/+3
2023-03-30Remove mention of `missing_doc_code_examples` lint from rustdoc bookGuillaume Gomez-3/+10
2023-03-26Rollup merge of #109593 - coop-rs:missing_doc_code_examples, r=GuillaumeGomezMatthias Krüger-1/+1
Rustdoc Book refer to rustdoc::missing_doc_code_examples. Fixes #109592. Fixes #109592. But, please see a related question at #109592 (item `2.`).
2023-03-25Rustdoc Book refer to rustdoc::missing_doc_code_examples. Fixes #109592.Peter Kehl-1/+1
2023-03-20doc: add generics improvements to rustdoc bookMichael Howell-5/+12
2023-02-21Update how-to-read-rustdoc.mdMichael Howell-0/+3
2023-01-08rustdoc: fix outdated lint section of the bookMichael Howell-1/+1
2022-12-27Fix doc comment parsingkraktus-2/+2
This can actually make a difference for the user if they rely on unicode formating. Prompted by https://github.com/dtolnay/syn/issues/771
2022-10-27doc(rustdoc): redirect more urlsWeihang Lo-0/+4
2022-10-08Rollup merge of #102807 - aDotInTheVoid:rdj-rustup-docs, r=jyn514Michael Howell-0/+10
Document `rust-docs-json` component Follow up to #102241 r? ````@jyn514````
2022-10-08Document `rust-docs-json` componentNixon Enraght-Moony-0/+10
2022-10-05rustdoc: Document effect of fundamental typeschrysn-0/+29
2022-07-25Fix some broken link fragments.Eric Huss-2/+2
2022-06-11Update the-doc-attribute.mdMuhammad Hamza-2/+2
2022-06-11Update the-doc-attribute.mdMuhammad Hamza-1/+3
2022-05-14Update documentation about themesGuillaume Gomez-12/+10
2022-05-06Add rustdoc documentation about unstable feature "jump to def"Guillaume Gomez-0/+7
2022-03-27Clarify that scrape examples is unstableWill Crichton-1/+1
2022-03-27Fix markdown issue, remove hard-coded rust-lang.org urlWill Crichton-2/+2
2022-03-27Improve alignment of additional scraped examples, add scrape examples help pageWill Crichton-0/+56
2022-03-10Rollup merge of #93950 - T-O-R-U-S:use-modern-formatting-for-format!-macros, ↵Dylan DPC-1/+1
r=Mark-Simulacrum Use modern formatting for format! macros This updates the standard library's documentation to use the new format_args syntax. The documentation is worthwhile to update as it should be more idiomatic (particularly for features like this, which are nice for users to get acquainted with). The general codebase is likely more hassle than benefit to update: it'll hurt git blame, and generally updates can be done by folks updating the code if (and when) that makes things more readable with the new format. A few places in the compiler and library code are updated (mostly just due to already having been done when this commit was first authored). `eprintln!("{}", e)` becomes `eprintln!("{e}")`, but `eprintln!("{}", e.kind())` remains untouched.
2022-03-10Use implicit capture syntax in format_argsT-O-R-U-S-1/+1
This updates the standard library's documentation to use the new syntax. The documentation is worthwhile to update as it should be more idiomatic (particularly for features like this, which are nice for users to get acquainted with). The general codebase is likely more hassle than benefit to update: it'll hurt git blame, and generally updates can be done by folks updating the code if (and when) that makes things more readable with the new format. A few places in the compiler and library code are updated (mostly just due to already having been done when this commit was first authored).
2022-03-09Improve rustdoc bookLoïc BRANSTETT-83/+106
2022-03-04Rollup merge of #93418 - ojeda:no-shortcut, r=camelidDylan DPC-1/+1
rustdoc & doc: no `shortcut` for `rel="icon"` According to https://html.spec.whatwg.org/multipage/links.html#rel-icon: > For historical reasons, the `icon` keyword may be preceded by the keyword "`shortcut`". And to https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types: > **Warning:** The `shortcut` link type is often seen before `icon`, but this link type is non-conforming, ignored and **web authors must not use it anymore.** While it was removed from the Rust logo case a while ago in commit 085679c ("Use theme-adaptive SVG favicon from other Rust sites"), it is still there for the custom logo case. Also updated a few other instances. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2022-02-28Rollup merge of #93413 - lsimons:patch-1, r=Dylan-DPCMatthias Krüger-1/+1
Fix broken link from rustdoc docs to ayu theme
2022-02-25Add documentation for `--check-cfg` in rustdoc bookLoïc BRANSTETT-0/+14
2022-02-18Rollup merge of #93497 - willcrichton:rustdoc-scrape-test, r=GuillaumeGomezMatthias Krüger-0/+3
Pass `--test` flag through rustdoc to rustc so `#[test]` functions can be scraped As a part of stabilizing the scrape examples extension in Cargo, I uncovered a bug where examples cannot be scraped from tests. See this test: https://github.com/rust-lang/cargo/pull/10343/files#diff-27aa4f012ebfebaaee61498d91d2370de460628405d136b05e77efe61e044679R2496 The issue is that when rustdoc is run on a test file, because `--test` is not passed as a rustc option, then functions annotated with `#[test]` are ignored by the compiler. So this PR changes rustdoc so when `--test` is passed in conjunction with a `--scrape-example-<suffix>` flag, then the `test` field of `rustc_interface::Config` is true. r? `@camelid`
2022-02-15Add documentation for rustdoc --check optionGuillaume Gomez-0/+11
2022-02-15Clean up rustdoc command line args docGuillaume Gomez-1/+3
2022-02-11Add --scrape-tests flags so rustdoc can scrape examples from testsWill Crichton-0/+3
2022-01-28rustdoc: no `shortcut` in `rel="icon"`Miguel Ojeda-1/+1
According to https://html.spec.whatwg.org/multipage/links.html#rel-icon: > For historical reasons, the `icon` keyword may be preceded by > the keyword "`shortcut`". And to https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types: > **Warning:** The `shortcut` link type is often seen before `icon`, > but this link type is non-conforming, ignored and **web authors > must not use it anymore.** While it was removed from the Rust logo case a while ago in commit 085679c8414 ("Use theme-adaptive SVG favicon from other Rust sites"), it is still there for the custom logo case. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2022-01-28Fix broken link from rustdoc docs to ayu themeLeo Simons-1/+1