Commit graph

182 commits

Author SHA1 Message Date
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
Guillaume Gomez
d108bd5386 Add documentation for --show-coverage option 2020-08-20 21:26:57 +02:00
Manish Goregaokar
8fe438e632 intra_doc_resolution_failures -> broken_intra_doc_links 2020-07-30 10:38:55 -07:00
Manish Goregaokar
4df76f0f90 Rename to intra_doc_resolution_failures 2020-07-30 08:14:27 -07:00
Manish Goregaokar
48de8ac041 Rename usage of intra_doc_link_resolution_failure 2020-07-29 15:23:14 -07:00
Manish Goregaokar
98450757e5 Revert "Remove "important traits" feature"
This reverts commit 1244ced958.
2020-07-16 09:58:17 -07:00
Manish Goregaokar
31d53decd0
Rollup merge of #74184 - Manishearth:doc-intra-doc, r=GuillaumeGomez
Add docs for intra-doc-links

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

Hmm, for some reason my push closed the previous PR
2020-07-09 11:50:48 -07:00
Manish Goregaokar
36a229b28d Move to unstable section 2020-07-09 09:19:50 -07:00
Manish Goregaokar
271e2a988f Update src/doc/rustdoc/src/intra-doc-links.md 2020-07-09 08:34:42 -07:00
Manish Goregaokar
09f51d41cc Add docs for intra-doc-links 2020-07-09 08:34:38 -07:00
Yuki Okushi
dd07774617
Fix broken link in rustdocdoc 2020-07-08 07:15:17 +09:00
Sean Wilson
2650c5fc6c doc/rustdoc: Fix incorrect external_doc feature flag 2020-06-06 17:20:06 -07:00
Stanislav Tkach
0bf269925b
Fix strip-priv-imports pass name in the rustdoc documentation 2020-05-07 16:22:22 +03:00
Theo Sandstrom
d55c3998e0 Corrects a typo in rustdoc documentation.
Fixes rust-lang#70856
2020-04-07 18:37:35 -04:00