58 Commits

Author SHA1 Message Date
QuietMisdreavus
db113f5319 rustdoc: add --extern-html-root-url flag 2018-06-12 15:19:21 -05:00
Robin Krahl
cf1f0385a8
Reorder description for snippets in rustdoc documentation
The example code snippets for the `no_run` and `compile_fail` attributes
in the rustdoc documentation were followed by the description for the
wrong attribute.  This patch reorders the descriptions to match the code
snippets.
2018-05-18 14:12:25 +02:00
Guillaume Gomez
1ed3e77b8a Add doc about doc alias feature 2018-04-22 00:30:48 +02:00
kennytm
932431ceda
Rollup merge of #49994 - frewsxcv:frewsxcv-doc-tests, r=QuietMisdreavus
Remove unnecessary indentation in rustdoc book codeblock.

None
2018-04-17 03:34:34 +08:00
Corey Farwell
afa22d63d7 Remove unnecessary indentation in rustdoc book codeblock. 2018-04-16 16:25:57 +09:00
QuietMisdreavus
a5456bdd87 add -C to the rustdoc book 2018-04-13 16:21:27 -05:00
Mark Simulacrum
5d3916d566
Rollup merge of #49451 - QuietMisdreavus:epoch-doctests, r=GuillaumeGomez
rustdoc: add an --edition flag to compile docs/doctests with a certain edition

To correspond with the 2018 edition, this adds a (currently unstable) `--edition` flag to rustdoc that makes it compile crates and doctests with the given edition. Once this lands, Cargo should be updated to pass this flag when the edition configuration option is given.
2018-04-01 18:04:54 +02:00
Guillaume Gomez
772a8028ff Rename main theme into light theme 2018-03-29 13:45:56 +02:00
QuietMisdreavus
a0e48dde7c talk about --edition in the Rustdoc Book 2018-03-27 16:36:15 +02:00
Alex Crichton
f74d01cf29 Rollup merge of #49028 - QuietMisdreavus:the-dark-forbidden-corners-of-rustdoc, r=frewsxcv
add an "unstable features" chapter to the rustdoc book

There are several rustdoc features that currently are undocumented, but also don't fit with the rest of the Rustdoc Book since they're also unstable. Some of these have corresponding feature gates and chapters in the Unstable Book, but many don't, and i wanted a place to talk about them officially.

Goal: talk about everything rustdoc can do that needs nightly

- [x] Feature gates (extensions to the doc attribute that can be caught by the compiler)
  - [x] doc(cfg)
  - [x] doc(masked)
  - [x] doc(spotlight)
  - [x] doc(include)
- [x] Command-line flags (features that require a CLI flag to use, where the flag itself is a `-Z` command or otherwise requires `-Z unstable-options` before rustdoc will accept it)
  - [x] markdown-before-content/markdown-after-content
  - [x] playground-url
  - [x] display-warnings
  - [x] crate-version
  - [x] linker
  - [x] sort-modules-by-appearance
  - [x] themes/theme-checker
  - [x] resource-suffix
  - [x] `-Z force-unstable-if-unmarked`
- [x] Nightly-gated functionality (features that are gated by requiring a nightly build without needing a CLI flag or a feature gate to unlock)
  - [x] intra-links
  - [x] error numbers for `compile_fail` doctests
2018-03-23 10:16:08 -07:00
QuietMisdreavus
b996f9d60f review comments 2018-03-21 09:52:18 -05:00
QuietMisdreavus
83e9f395d1 talk about force-unstable-if-unmarked 2018-03-20 11:23:48 -05:00
QuietMisdreavus
5e93394d32 talk about --display-warnings 2018-03-20 11:18:42 -05:00
QuietMisdreavus
b5ab5ceb4b talk about --resource-suffix 2018-03-16 15:06:36 -05:00
QuietMisdreavus
6b2906018f talk about --themes and --theme-checker 2018-03-16 14:41:51 -05:00
QuietMisdreavus
cc4f97e883 talk about --sort-modules-by-appearance 2018-03-16 14:30:56 -05:00
QuietMisdreavus
33ed787b49 talk about --linker 2018-03-16 13:46:10 -05:00
QuietMisdreavus
f9d3845138 talk about --crate-version 2018-03-16 13:38:06 -05:00
QuietMisdreavus
5d8443aeb1 talk about --playground-url 2018-03-15 14:44:17 -05:00
kennytm
97b489ef39
Rollup merge of #48961 - Songbird0:rustdoc_doctests_assertions, r=GuillaumeGomez
Rustdoc: example of use of assertions

I added this section at the beginning of the file because it seems to be basic information. Let me know if there's someplace more relevant.

See #47945.
2018-03-16 01:49:45 +08:00
QuietMisdreavus
bb328237fc talk about --markdown-(before|after)-content 2018-03-15 12:47:26 -05:00
QuietMisdreavus
43ed37711e add new section about CLI flags 2018-03-15 09:35:22 -05:00
QuietMisdreavus
c24a58c87c fix link 2018-03-15 09:29:54 -05:00
QuietMisdreavus
3d90b4d738 add headings to categorize the features 2018-03-14 17:22:15 -05:00
QuietMisdreavus
067553d5a1 talk about doc(include) 2018-03-14 17:13:52 -05:00
QuietMisdreavus
82bd146d60 talk about doc(masked) 2018-03-14 16:40:28 -05:00
QuietMisdreavus
23a1da4d63 talk about doc(spotlight) 2018-03-14 16:06:53 -05:00
QuietMisdreavus
0f96e145fb talk about doc(cfg) 2018-03-14 15:32:25 -05:00
QuietMisdreavus
30adb53f46 talk about intra-links 2018-03-13 17:00:51 -05:00
Anthony Defranceschi
a48224b9ac Add a section for using assertions into doc tests.
See #47945.
2018-03-13 14:20:57 +01:00
QuietMisdreavus
373b2cdcd1 talk about error numbers for compile_fail doctests 2018-03-12 17:26:20 -05:00
QuietMisdreavus
c685b57bf2 add page to the Rustdoc Book about unstable features 2018-03-12 17:16:21 -05:00
QuietMisdreavus
c80220436b big fences to show that ``rust is the same as `` 2018-03-12 16:15:38 -05:00
Carol (Nichols || Goulding)
c698496f84
Reexport -> re-export in documentation section headings 2018-01-15 13:36:52 -05:00
Martin Lindhe
ece9a57d1b fix some typos 2017-11-21 15:33:45 +01:00
QuietMisdreavus
ce7a3a4584 rustdoc book: talk about #![doc(test(...))] in doctests chapter 2017-11-04 14:54:15 -05:00
QuietMisdreavus
5fbadfcdbe rustdoc book: add #![doc(test(no_crate_inject))] and #![doc(test(attr(...)))] 2017-11-04 14:54:14 -05:00
kennytm
2ff1ad08ad Rollup merge of #45308 - dbrgn:headlines, r=steveklabnik
Rustdoc book: Add missing headlines

Some options were missing headlines, which looked a bit inconsistent.
2017-10-17 22:20:59 +08:00
Danilo Bargen
fdb3e37126 Rustdoc book: Add missing headlines
Some options were missing headlines, which looked a bit inconsistent.
2017-10-15 17:02:45 +02:00
Danilo Bargen
b7d378a94c Fix typo in rustdoc book 2017-10-15 16:59:54 +02:00
Guillaume Gomez
ebc195d292 Add precision for rustdoc block codes 2017-09-03 13:15:16 +02:00
Guillaume Gomez
2ffcfeb821 Add compile_fail documentation 2017-09-03 13:15:15 +02:00
bors
c774c95919 Auto merge of #43863 - steveklabnik:ship-the-rustdoc-book, r=frewsxcv
Ship the rustdoc book

Fixes #42322, as it's the last step.

Blocked on https://github.com/rust-lang/rust/pull/43790, though they will not conflict.

r? @rust-lang/docs
2017-08-15 07:28:54 +00:00
steveklabnik
2c6cf22a30 Remove plugins chapter
we don't want to support plugins
2017-08-14 20:33:30 -04:00
Corey Farwell
b1bdf13e6b Rollup merge of #43790 - steveklabnik:rustdoc-passes, r=QuietMisdreavus
Write the "passes" chapter of the rustdoc book

cc #42322

r? @rust-lang/docs
2017-08-14 20:28:44 -04:00
steveklabnik
7a5ee171c3 Write the "passes" chapter of the rustdoc book
cc #42322
2017-08-14 15:10:56 -04:00
bors
59f6b8338e Auto merge of #43812 - steveklabnik:rustdoc-doc-tests, r=QuietMisdreavus
rustdoc doc tests

This is mostly adapted from the book v1's chapter.

cc https://github.com/rust-lang/rust/issues/42322

r? @rust-lang/docs
2017-08-12 09:34:13 +00:00
steveklabnik
035d4ea2ca rustdoc doc tests 2017-08-11 16:43:38 -04:00
steveklabnik
1e4aaea431 address review feedback 2017-08-11 16:24:18 -04:00
steveklabnik
92f8442434 ignore more things 2017-08-10 20:17:41 -04:00