Commit graph

195 commits

Author SHA1 Message Date
Dylan DPC
d9bc16cf36
Rollup merge of #82261 - ojeda:rustdoc-argfile, r=jyn514
rustdoc: Support argument files

Factors out the `rustc_driver` logic that handles argument files so that rustdoc supports them as well, e.g.:

    rustdoc `@argfile`

This is needed to be able to generate docs for projects that already use argument files when compiling them, e.g. projects that pass a huge number of `--cfg` arguments.

The feature was stabilized for `rustc` in #66172.
2021-02-19 02:49:12 +01:00
Miguel Ojeda
755b3fc722 rustdoc: Support argument files
Factors out the `rustc_driver` logic that handles argument files
so that rustdoc supports them as well, e.g.:

    rustdoc @argfile

This is needed to be able to generate docs for projects that
already use argument files when compiling them, e.g. projects
that pass a huge number of `--cfg` arguments.

The feature was stabilized for `rustc` in #66172.

Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2021-02-19 02:32:45 +01:00
Jonas Schievink
e143159e75
Rollup merge of #81766 - jyn514:task-lists, r=GuillaumeGomez
Enable 'task list' markdown extension

Closes https://github.com/rust-lang/rust/issues/71183.
2021-02-06 17:01:50 +01:00
Joshua Nelson
9653b601b2 Enable 'task list' markdown extension
- Add documentation about task lists
2021-02-06 00:08:21 -05:00
Eric Huss
dc7746f334 Elaborate on rustdoc example reason for being ignored. 2021-02-04 09:01:50 -08:00
Eric Huss
bb22eaf39e tidy: Run tidy style against markdown files. 2021-02-04 09:01:50 -08:00
Eric Huss
1c0a52d304 rustdoc: Document CommonMark extensions. 2021-01-25 11:03:15 -08:00
Mara Bos
7800c70fab
Rollup merge of #80410 - MarcoIeni:patch-1, r=jonas-schievink
rustdoc book: fix example

`lib.rs` file is created only if `--lib` flag is specified
2020-12-28 19:09:29 +00:00
Mara Bos
bae6475443
Rollup merge of #80393 - ehuss:doc-git-link, r=jyn514
Add links to the source for the rustc and rustdoc books.

This adds a little icon in the upper-right corner of the books so that readers can find the source if they want to make changes or file issues. This is already included in several of the other books.
2020-12-28 19:09:22 +00:00
Marco Ieni
f57152f640
rustdoc book: fix example 2020-12-27 14:10:00 +01:00
Eric Huss
142764f79e Add links to the source for the rustc and rustdoc books. 2020-12-26 13:22:33 -08:00
Ian Jackson
63f3876b85
fix typo in src/doc/rustdoc/src/command-line-arguments.md
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2020-12-03 10:22:57 +00:00
Ian Jackson
c21b275d35 rustdoc: document --default-theme option in command line doc
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2020-12-03 00:50:37 +00:00
bors
a601302ff0 Auto merge of #75778 - AndyGauge:75521-rustdoc-book-improvements, r=jyn514
75521 rustdoc book improvements

Added some guidelines about documenting with rustdoc
Fixes #75521
2020-11-06 19:01:10 +00:00
Guillaume Gomez
9d114506c6 Rename lint to non_autolinks 2020-11-05 10:22:08 +01:00
Guillaume Gomez
fce2be0ea7 Update URLs used in the lint example 2020-11-05 10:22:08 +01:00
Guillaume Gomez
60caf51b0d Rename automatic_links to url_improvements 2020-11-05 10:22:08 +01:00
Guillaume Gomez
7f839b2ece Improve automatic_links globally 2020-11-05 10:22:08 +01:00
Guillaume Gomez
f467b8d77c Extend automatic_links lint to take into account URLs without link syntax 2020-11-05 10:22:08 +01:00
Guillaume Gomez
a54f043733 Add documentation for automatic_links lint 2020-11-05 10:22:08 +01:00
Andrew Gauger
881820aa06 Added Rustdoc book sections for linting and embedding more examples
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2020-11-04 17:47:50 -08:00
Guillaume Gomez
f553c226c1
Fix typo "compiltest" 2020-10-28 15:51:26 +01:00
Camelid
d725da129e Clean up and improve some docs
* compiler docs
  * Don't format list as part of a code block
  * Clean up some other formatting
* rustdoc book
  * Update CommonMark spec version to latest (0.28 -> 0.29)
  * Clean up some various wording and formatting
2020-10-21 18:01:04 -07:00
Camelid
330ce948f7
Link to GitHub issue re macro resolution
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2020-10-09 16:03:00 -07:00
Camelid
b9c299effd Update rustdoc intra-doc link docs
* Describe generic parameters feature
* Make general improvements to the docs
2020-10-08 22:24:38 -07:00
bors
8ae3b50976 Auto merge of #77119 - GuillaumeGomez:unclosed-html-tag-lint, r=jyn514
Unclosed html tag lint

Part of #67799.

I think `@ollie27` will be interested (`@Manishearth` too since they opened the issue ;) ).

r? `@jyn514`
2020-10-07 09:56:51 +00:00
Yuki Okushi
97ee62cee4
Rollup merge of #76855 - jyn514:platform-specific, r=ollie27
Revamp rustdoc docs about documentation using `cfg`

- Move `cfg(doc)` out of `unstable-features`. It's not unstable.
- Remove outdated reference to `everybody_loops`.
- Improve wording in various places
- Give an example of code this allows (and does not allow)
- Link to `cfg(doc)` in `doc(cfg)` documentation. Since one is stable
and the other is not, don't combine them.
- Cleanup wording for `doc(cfg)`
- Incorporate changes from #76849
- Mention that `doc(cfg)` is also for features

Addresses https://github.com/rust-lang/rust/pull/76849#issuecomment-694516199.
Obsoletes https://github.com/rust-lang/rust/pull/76849 (I made sure to fix the weird dashes too).
r? @steveklabnik
2020-10-06 16:25:55 +09:00
Joshua Nelson
dc5a000d79 Revamp rustdoc docs about documentation using cfg
- Move `cfg(doc)` out of `unstable-features`. It's not unstable.
- Remove outdated reference to `everybody_loops`.
- Improve wording in various places
- Give an example of code this allows (and does not allow)
- Link to `cfg(doc)` in `doc(cfg)` documentation. Since one is stable
and the other is not, don't combine them.
- Cleanup wording for `doc(cfg)`
- Incorporate changes from #76849
- Mention that `doc(cfg)` is also for features
2020-10-05 19:06:38 -04:00
Guillaume Gomez
f9a65afb27 Make invalid_html_tags lint only run on nightly and being allowed by default 2020-10-03 14:16:24 +02:00
Guillaume Gomez
5fcbf4668e Add doc for invalid_html_tag lint 2020-10-03 14:16:24 +02:00
Jonas Schievink
c7c2418227
Rollup merge of #76811 - GuillaumeGomez:doc-alias-name-restriction, r=oli-obk,ollie27
Doc alias name restriction

Fixes #76705.
2020-10-02 20:27:03 +02:00
Guillaume Gomez
4427b2d52c Update doc alias documentation 2020-10-02 19:26:59 +02:00
Joshua Nelson
80ffaed809 Add documentation for private_intra_doc_links 2020-09-27 10:44:41 -04:00
bors
78a089487b Auto merge of #74430 - Manishearth:stabilize-intra-doc, r=Manishearth
Stabilize intra-doc links

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

Thanks to the great work of `@jyn514` in getting the [cross-crate reexport issue](https://github.com/rust-lang/rust/issues/65983) in intra-rustdoc links fixed, I think we're now in a position to stabilize this feature.

The tracking issue currently has two unresolved issues:

 - <s>behavior around doc(hidden): This is fixed in https://github.com/rust-lang/rust/pull/73365, which is just waiting for CI and should land tomorrow. It's also a pretty niche bug so while I expect it to land soon I don't think we need to block stabilization on it anyway.</s>
 - Non-identifier primitive types like slices: This was not a part of the original RFC anyway, and is a pretty niche use case

The feature itself, sans https://github.com/rust-lang/rust/issues/65983, has been shipped on nightly for three years now, with people using it on docs.rs. https://github.com/rust-lang/rust/issues/65983 itself is not an overwhelmingly central bit of functionality; the reason we elected to block stabilization on it was that back in 2017 it was not possible to fix the issue without some major refactorings of resolve, and we did not want to stabilize something that had such a potentially unfixable bug.

Given that we've fixed it, I see no reason to delay stabilization on this long awaited feature. It's possible that the latest patches have problems, however we _have_ done crater runs of some of the crucial parts. Furthermore, that's what the release trains are for, we will have a solid three months to let it ride the trains before it actually hits the stable compiler.

r? `@rust-lang/rustdoc`
2020-09-24 03:42:53 +00:00
Manish Goregaokar
6928041c0a
Update src/doc/rustdoc/src/linking-to-items-by-name.md
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2020-09-17 20:21:09 -07:00
Manish Goregaokar
792b2ea581
Update src/doc/rustdoc/src/lints.md
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2020-09-14 22:35:41 -07:00
Guillaume Gomez
d069c7e928 Stabilize doc_alias feature 2020-09-14 11:03:47 +02:00
Manish Goregaokar
6f1fa2b163 Fix lint name in docs 2020-09-13 18:16:54 -07:00
Manish Goregaokar
51c1351f7b Resolve some conflicts 2020-09-13 18:14:34 -07:00
Manish Goregaokar
175e30539d Update src/doc/rustdoc/src/linking-to-items-by-name.md
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2020-09-13 18:12:52 -07:00
Manish Goregaokar
4e0eb0b73b Update src/doc/rustdoc/src/linking-to-items-by-name.md
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2020-09-13 18:12:52 -07:00
Manish Goregaokar
2a98409634 Fill out docs on intra-doc resolution failure lint 2020-09-13 18:12:52 -07:00
Manish Goregaokar
f072e4a732 Mention URL fragments 2020-09-13 18:12:52 -07:00
Manish Goregaokar
bc06674774 Mention super/crate/self in docs 2020-09-13 18:12:51 -07:00
Manish Goregaokar
63d5beec43 Move intra-doc-links documentation out of unstable section 2020-09-13 18:12:49 -07:00
Eric Huss
ce014be0b9 Link rustdoc lint docs to the rustdoc book. 2020-09-13 08:48:03 -07:00
arijit79
fd5859a673 Add docs about crate level documentation support 2020-09-10 10:29:24 -04:00
Jes Bak Hansen
7eb4b1b4b9 Document lint missing_doc_code_examples is nightly-only 2020-09-01 20:45:21 +02:00
Joshua Nelson
73de34319e Document prim@ and primitive@ 2020-08-23 22:40:20 -04:00
Guillaume Gomez
10a880d20e Improve wording 2020-08-21 09:49:26 +02:00