Mazdak Farrokhzad
b1aad76586
Normalize syntax::edition
imports.
2020-01-02 19:31:38 +01:00
Mark Rousskov
a06baa56b9
Format the world
2019-12-22 17:42:47 -05:00
Eric Huss
1907589fbb
rustdoc: Stabilize edition
annotation.
2019-11-08 16:15:17 -08:00
Mark Rousskov
3f144e119e
Move Toc printing from fmt::Display
2019-09-13 19:44:44 -04:00
bors
87b0c9036f
Auto merge of #60387 - Goirad:test-expansion, r=ollie27
...
Allow cross-compiling doctests
This PR allows doctest to receive a --runtool argument, as well as possibly many --runtool-arg arguments, which are then used to run cross compiled doctests.
Also, functionality has been added to rustdoc to allow it to skip testing doctests on a per-target basis, in the same way that compiletest does it. For example, tagging the doctest with "ignore-sgx" disables testing on any targets that contain "sgx". A plain "ignore" still skips testing on all targets.
See [here](https://github.com/rust-lang/cargo/pull/6892 ) for the companion PR in the cargo project that extends functionality in Cargo so that it passes the appropriate parameters to rustdoc when cross compiling and testing doctests.
Part of [#6460 ](https://github.com/rust-lang/cargo/issues/6460 )
2019-09-10 12:19:41 +00:00
Eric Huss
fb387088e2
rustdoc: fix diagnostic with mixed code block styles
2019-09-07 12:21:32 -07:00
Dario Gonzalez
14110ebd93
added rustdoc book documentation, improved behavior when unstable flag not present
2019-09-03 13:53:00 -07:00
Dario Gonzalez
3f76408841
added feature gate enable-per-target-ignores
...
updated and augmented tests in html/markdown.rs
2019-09-03 13:50:36 -07:00
Dario Gonzalez
98bd8fd88c
Added ability to crosscompile doctests
2019-09-03 13:48:18 -07:00
Mark Rousskov
b0fab966fa
Shorten line during rendering instead of in markdown
2019-08-26 20:30:10 -04:00
Mark Rousskov
1aa0964b54
Drop RefCell from IdMap in markdown rendering
2019-08-11 10:47:58 -04:00
Mark Rousskov
c250b5fd03
Remove fmt::Display impls on Markdown structs
...
These impls prevent ergonomic use of the config (e.g., forcing us to use
RefCell) despite all usecases for these structs only using their Display
impls once.
2019-08-11 10:36:46 -04:00
Mark Rousskov
dbad77ffdd
Remove thread-local for playground config
2019-08-11 10:36:46 -04:00
Vadim Petrochenkov
a332e224a3
librustdoc: Unconfigure tests during normal build
2019-08-02 01:59:01 +03:00
Vadim Petrochenkov
5a9643c95b
Fix tidy
2019-06-16 14:17:21 +03:00
chansuke
46e622beb9
Separate librustcdoc module
2019-06-16 14:17:01 +03:00
Andy Russell
ed8a4d5bc1
upgrade rustdoc's pulldown-cmark
to 0.5.2
...
Fixes #60482 .
2019-05-29 10:59:59 -04:00
QuietMisdreavus
e61ff7717e
update rustdoc doc test
2019-05-06 15:20:18 -05:00
QuietMisdreavus
5b167bf4bb
update rustdoc unit tests
2019-05-06 15:20:18 -05:00
QuietMisdreavus
20a5aa302e
set the default edition when pre-parsing a doctest
2019-05-06 15:20:18 -05:00
Andy Russell
303016485b
upgrade rustdoc's pulldown-cmark to 0.4.1
2019-04-22 09:11:26 -04:00
Hirokazu Hata
1932d7a52d
Transition librustdoc to 2018 edition
2019-02-23 16:40:07 +09:00
Alexander Regueiro
c3e182cf43
rustc: doc comments
2019-02-10 23:42:32 +00:00
Andy Russell
8c93798e9f
rustdoc: check code block syntax in early pass
2019-01-14 21:21:21 -05:00
Mark Rousskov
2a663555dd
Remove licenses
2018-12-25 21:08:33 -07:00
Guillaume Gomez
987bf2ed29
Split on words instead
2018-12-13 22:11:22 +01:00
Guillaume Gomez
24031466b7
Remove unneeded extra chars to reduce search-index size
2018-12-11 22:29:43 +01:00
Guillaume Gomez
3030cbea95
Remove short doc where it starts with a codeblock
2018-11-10 19:03:58 +01:00
QuietMisdreavus
d0c9385781
add Debug impls for the Options structs
2018-11-04 16:39:24 -06:00
QuietMisdreavus
157833c588
swap uses of Matches with pre-parsed args
2018-11-02 16:24:58 -05:00
Guillaume Gomez
d6385631f4
Add lint for doc without codeblocks
2018-10-09 16:47:12 +02:00
Philip Munksgaard
b01e0e43d4
Add a documentation banner for edition specific code
2018-09-20 08:36:07 +02:00
Philip Munksgaard
c996c4d316
Add support for running doc test in specific edition
2018-09-19 14:32:09 +02:00
Eduard-Mihai Burtescu
93f3f5b155
Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc.
2018-08-28 17:04:04 +03:00
ljedrz
44d32d4413
Avoid unnecessary pattern matching against Option and Result
2018-08-07 10:24:27 +02:00
Mark Rousskov
8e65a46268
Cleanup highlighting code
...
Removes some unused code and de-publicizes structs
2018-07-31 17:55:12 -06:00
Mark Rousskov
7bea518d3a
Remove global derive_id and reset_ids functions
...
Previously these functions relied on TLS but we can instead thread the
relevant state through explicitly.
2018-07-31 17:55:12 -06:00
Mark Rousskov
2216db9de7
Format code for easier editing
2018-07-31 11:39:04 -06:00
Mark Rousskov
01d95558e6
Further extract error code switch
...
Removes dependency on UnstableFeatures from markdown rendering
2018-07-31 11:39:02 -06:00
Mark Rousskov
03e34f8f81
Remove dependency on error handling from find_testable_code
2018-07-31 11:37:21 -06:00
Mark Rousskov
de5cebdba5
Provide test configuration through struct
...
This is far more sound than passing many different arguments of the same
type.
2018-07-31 11:37:21 -06:00
Mark Rousskov
ad40e4517f
Provide warnings for invalid code blocks in markdown files
...
Previously we would only warn on Rust code but we can also do so when
testing markdown (the diag::Handler is available).
2018-07-31 11:37:21 -06:00
Mark Rousskov
0af5a6be05
Pull out nightly checking to edges
...
Parsing the code block's LangString (```foo) previously checked itself
to see if we were on nightly; that isn't the right place to do so. Move
that check slightly outwards to better abstract LangString.
(This is also an optimization as we avoid the costly environment
variable load of RUSTC_BOOTSTRAP).
2018-07-31 11:37:21 -06:00
ljedrz
57a5a9b054
Prefer to_string() to format!()
2018-07-27 11:11:18 +02:00
bors
a8403e1cda
Auto merge of #51861 - GuillaumeGomez:prevent-some-markdown-short-doc, r=QuietMisdreavus
...
Prevent some markdown transformation on short docblocks
Before:
<img width="1440" alt="screen shot 2018-06-28 at 01 46 01" src="https://user-images.githubusercontent.com/3050060/42005762-7d533bbe-7a76-11e8-8361-027886803399.png ">
After:
<img width="1440" alt="screen shot 2018-06-28 at 01 46 02" src="https://user-images.githubusercontent.com/3050060/42005768-81bd59a0-7a76-11e8-819b-9b4be72579d6.png ">
This is only performed on short doc blocks, not on plain ones. Not all transformations are prevented (you still have a few like urls, code blocks, etc...).
cc @nical
r? @QuietMisdreavus
2018-07-06 00:36:34 +00:00
Guillaume Gomez
6a86ee7328
Prevent some markdown transformation on short docblocks
2018-06-28 01:55:43 +02:00
Lucas Morales
d3b4cb1730
rustdoc codeblock hash escape
2018-06-26 00:58:16 -04:00
kennytm
2886aca232
Show which line the link is coming from.
2018-06-03 18:25:04 +08:00
kennytm
d7eda77692
Rollup merge of #49189 - GuillaumeGomez:fix-implied-shortcut-links, r=QuietMisdreavus
...
Fix automatic urls with backticks
Fixes #49164 .
r? @QuietMisdreavus
2018-03-22 22:43:43 +08:00
Guillaume Gomez
bac6484a31
Fix automatic urls with backticks
2018-03-19 23:25:55 +01:00