Commit Graph

326 Commits

Author SHA1 Message Date
PhilVoel 59ed84a5b8 Fixed typo in re-exports.md
own't -> won't
2023-09-10 02:54:37 +02:00
Urgau 85e4b89cf6 rustdoc: start new "Sections" section in the book with Aliased Type 2023-08-28 14:03:33 +02:00
bors 5e9d3d8a03 Auto merge of #106561 - GuillaumeGomez:warning-block, r=rustdoc
Add warning block support in rustdoc

Fixes https://github.com/rust-lang/rust/issues/79710.

You can test it [here](https://rustdoc.crud.net/imperio/warning-block/foo/struct.Foo.html). It currently looks like this:

![image](https://user-images.githubusercontent.com/3050060/211413494-e1cf04e4-c081-4a9d-97db-27329405cfa7.png)

So a few things to note:

 * Since it's a new add and it's changing the UI, we'll need to go through an FCP.
 * Does the UI looks good?
 * Is the way picked to add a warning block ok for everyone? The discussion on the issue seemed to be in favour of this solution but it doesn't hurt to double-check.

cc `@rust-lang/rustdoc`
2023-08-21 09:26:02 +00:00
Kyle Lin 65e24a57bb Fix resolution caching 2023-08-18 15:19:10 +08:00
Kyle Lin da582a71d2 Add warn level lint redundant_explicit_links
- Currently it will panic due to the resolution's caching issue
2023-08-18 15:19:08 +08:00
Guillaume Gomez 1d42913058 Add GUI test for warning blocks 2023-08-14 13:51:41 +02:00
Guillaume Gomez 57d2b84a57 Add documentation for warning blocks in rustdoc book 2023-08-14 13:41:17 +02:00
Nilstrieb 5830ca216d Add internal_features lint
It lints against features that are inteded to be internal to the
compiler and standard library. Implements MCP #596.

We allow `internal_features` in the standard library and compiler as those
use many features and this _is_ the standard library from the "internal to the compiler and
standard library" after all.

Marking some features as internal wasn't exactly the most scientific approach, I just marked some
mostly obvious features. While there is a categorization in the macro,
it's not very well upheld (should probably be fixed in another PR).

We always pass `-Ainternal_features` in the testsuite
About 400 UI tests and several other tests use internal features.
Instead of throwing the attribute on each one, just always allow them.
There's nothing wrong with testing internal features^^
2023-08-03 14:50:50 +02:00
Matthias Krüger cfeeab5ce0 Rollup merge of #112741 - geometryolife:fix, r=workingjubilee
fix typo in `rustdoc/src/what-is-rustdoc.md`
2023-07-17 12:58:52 +02:00
bors bf0e22b298 Auto merge of #108537 - GuillaumeGomez:rustdoc-search-whitespace-as-separator, r=notriddle
rustdoc: Allow whitespace as path separator like double colon

Fixes https://github.com/rust-lang/rust/issues/108447.

I think it makes sense since it allows more common cases, however it also makes the syntax heavier. Not sure what the rest of the team thinks about it. In any case we'll need to go through FCP.

Full explanation for the changes is available [here](https://github.com/rust-lang/rust/pull/108537#issuecomment-1589480564).

r? `@notriddle`
2023-07-02 18:49:29 +00:00
Trevor Gross 4fae271352 Document tracking issue for rustdoc show-type-layout 2023-07-01 19:41:26 -04:00
Joe Chen d456d11544 fix typo in rustdoc/src/what-is-rustdoc.md 2023-06-17 20:08:33 +08:00
Matthias Krüger 9bc95a4bc9 Rollup merge of #112304 - GuillaumeGomez:re-exports, r=notriddle
Add chapter in rustdoc book for re-exports and add a regression test for `#[doc(hidden)]` behaviour

Fixes https://github.com/rust-lang/rust/issues/109449.
Fixes https://github.com/rust-lang/rust/issues/53417.

After the discussion in #109697, I made a few PRs to fix a few corner cases:
 * https://github.com/rust-lang/rust/pull/112178
 * https://github.com/rust-lang/rust/pull/112108
 * https://github.com/rust-lang/rust/pull/111997

With this I think I covered all cases. Only thing missing at this point was a chapter covering re-exports in the rustdoc book.

r? `@notriddle`
2023-06-15 17:52:36 +02:00
Guillaume Gomez 64417c52d6 Add documentation for paths in rustdoc search 2023-06-14 14:22:17 +02:00
Michael Howell 7a1154e159 rustdoc: update book with [] syntax 2023-06-10 13:52:56 -07:00
Guillaume Gomez 44b1365885 Add chapter for re-exports in the rustdoc book 2023-06-05 20:30:50 +02:00
Lukas Markeffsky c2a446a95e rustdoc book: document single tilde strikethrough 2023-05-25 13:29:39 +00:00
Lukas Markeffsky 4f15a772b3 Add rustdoc::unescaped_backtick lint 2023-04-29 13:13:25 +02:00
John Kelly db0bb92ff1 Remove invalid value from scraped-examples.md 2023-04-27 17:21:45 +01:00
Matthias Krüger 66a5ac0199 Rollup merge of #110641 - GuillaumeGomez:rustdoc-in-doc-settings, r=notriddle
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-26 18:51:42 +02:00
jyn 3163dfd1cd Rollup merge of #110418 - jsoref:spelling-rustdoc, r=jyn514
Spelling rustdoc

Split per https://github.com/rust-lang/rust/pull/110392#issuecomment-1510148682
2023-04-26 01:55:51 -05:00
Guillaume Gomez 1c3efc6356 Add new rustdoc book chapter to describe in-doc settings 2023-04-22 23:17:11 +02:00
Matthias Krüger afea84f99c Rollup merge of #110348 - 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-18 06:44:45 +02:00
Guillaume Gomez a091fd25ca Add list of supported disambiguators and suffixes for intra-doc links in the rustdoc book 2023-04-17 11:09:24 +02:00
Josh Soref b9b48e792e spelling: typographical
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-16 12:25:03 -04:00
Josh Soref b9f960407a spelling: github
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-16 12:25:02 -04:00
bors 3312a3053b Auto merge of #109802 - notriddle:notriddle/rustdoc-search-generics-nested, 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-15 02:23:32 +00:00
Michael Howell 6ce53278e1 Update how-to-read-rustdoc.md 2023-04-14 14:55:45 -07:00
Matthias Krüger 0d97522ee7 Rollup merge of #110328 - GuillaumeGomez:auto-disambiguation-proc-trait, 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-14 21:11:13 +02:00
Guillaume Gomez d38fd29b5b Add explanations for auto-disambiguation when an intra doc link is resolved to a proc-macro and a trait at the same time 2023-04-14 20:21:07 +02:00
Yuki Okushi 9aa24fd8fb Rollup merge of #103682 - Swatinem:stable-run-directory, r=GuillaumeGomez
Stabilize rustdoc `--test-run-directory`

This should resolve https://github.com/rust-lang/rust/issues/84674
2023-04-14 23:00:33 +09:00
Guillaume Gomez b76821b4de Update rustdoc book content about --extend-css option 2023-04-12 20:07:10 +02:00
bors 4f87a63edc Auto merge of #109767 - GuillaumeGomez:rm-mention-missing_doc_code_examples, 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-04-08 13:38:03 +00:00
Arpad Borsos 2e924bbef3 Stabilize rustdoc --test-run-directory 2023-03-31 14:01:53 +02:00
Guillaume Gomez 48f7148fca Update documentation for rustc_doc_primitive 2023-03-30 22:56:52 +02:00
Guillaume Gomez b85fcf51d2 Remove mention of missing_doc_code_examples lint from rustdoc book 2023-03-30 16:49:37 +02:00
Matthias Krüger 623c4c8881 Rollup merge of #109593 - coop-rs:missing_doc_code_examples, r=GuillaumeGomez
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-26 08:39:26 +02:00
Peter Kehl 1491c6f311 Rustdoc Book refer to rustdoc::missing_doc_code_examples. Fixes #109592. 2023-03-25 06:19:52 -07:00
Michael Howell cae43859d3 doc: add generics improvements to rustdoc book 2023-03-20 22:41:58 -07:00
Michael Howell 07cf219722 Update how-to-read-rustdoc.md 2023-02-21 21:52:44 -07:00
Michael Howell 6dd1086ead rustdoc: fix outdated lint section of the book 2023-01-08 15:03:42 -07:00
kraktus ce1e6a4612 Fix doc comment parsing
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-12-27 13:31:53 +01:00
Weihang Lo ddba6c1e6c doc(rustdoc): redirect more urls 2022-10-27 00:17:16 +08:00
Michael Howell 8c4191abca Rollup merge of #102807 - aDotInTheVoid:rdj-rustup-docs, r=jyn514
Document `rust-docs-json` component

Follow up to #102241

r? ````@jyn514````
2022-10-08 18:15:01 -07:00
Nixon Enraght-Moony 7e64000915 Document rust-docs-json component 2022-10-08 12:16:59 +01:00
chrysn 31bc385fa1 rustdoc: Document effect of fundamental types 2022-10-05 19:29:19 +02:00
Eric Huss 91599b44dc Fix some broken link fragments. 2022-07-25 09:16:28 -07:00
Muhammad Hamza 74d210e32c Update the-doc-attribute.md 2022-06-11 03:10:29 +05:00
Muhammad Hamza 2147a069ff Update the-doc-attribute.md 2022-06-11 02:03:33 +05:00
Guillaume Gomez dee294759b Update documentation about themes 2022-05-14 17:21:52 +02:00