| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
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``
|
|
Spelling rustdoc
Split per https://github.com/rust-lang/rust/pull/110392#issuecomment-1510148682
|
|
|
|
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```
|
|
rustdoc book
|
|
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
|
|
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
|
|
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>>`.
|
|
|
|
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`
|
|
to a proc-macro and a trait at the same time
|
|
Stabilize rustdoc `--test-run-directory`
This should resolve https://github.com/rust-lang/rust/issues/84674
|
|
|
|
r=notriddle
Remove mention of `missing_doc_code_examples` lint from rustdoc book
Fixes https://github.com/rust-lang/rust/issues/109601.
r? `@notriddle`
|
|
|
|
|
|
|
|
Rustdoc Book refer to rustdoc::missing_doc_code_examples. Fixes #109592.
Fixes #109592. But, please see a related question at #109592 (item `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
|
|
|
|
Document `rust-docs-json` component
Follow up to #102241
r? ````@jyn514````
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
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).
|
|
|
|
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>
|
|
Fix broken link from rustdoc docs to ayu theme
|
|
|
|
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`
|
|
|
|
|
|
|
|
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>
|
|
|