summary refs log tree commit diff
path: root/src/librustdoc/lib.rs
AgeCommit message (Collapse)AuthorLines
2018-02-08Pass themes folder as parameterGuillaume Gomez-5/+5
2018-02-08Add tests for themesGuillaume Gomez-4/+4
2018-02-08Improve output a bit in case of errorGuillaume Gomez-4/+7
2018-02-08Add test when trying to add new themeGuillaume Gomez-5/+16
2018-02-08get differencesGuillaume Gomez-1/+3
2018-02-08Add theme testsGuillaume Gomez-0/+27
2018-01-27rustc: Load the `rustc_trans` crate at runtimeAlex Crichton-2/+0
Building on the work of # 45684 this commit updates the compiler to unconditionally load the `rustc_trans` crate at runtime instead of linking to it at compile time. The end goal of this work is to implement # 46819 where rustc will have multiple backends available to it to load. This commit starts off by removing the `extern crate rustc_trans` from the driver. This involved moving some miscellaneous functionality into the `TransCrate` trait and also required an implementation of how to locate and load the trans backend. This ended up being a little tricky because the sysroot isn't always the right location (for example `--sysroot` arguments) so some extra code was added as well to probe a directory relative to the current dll (the rustc_driver dll). Rustbuild has been updated accordingly as well to have a separate compilation invocation for the `rustc_trans` crate and assembly it accordingly into the sysroot. Finally, the distribution logic for the `rustc` package was also updated to slurp up the trans backends folder. A number of assorted fallout changes were included here as well to ensure tests pass and such, and they should all be commented inline.
2018-01-23Auto merge of #47620 - GuillaumeGomez:multiple-themes, r=QuietMisdreavusbors-1/+16
Multiple themes for rustdoc r? @QuietMisdreavus
2018-01-22Update to new commonmark argManish Goregaokar-3/+3
2018-01-22cleanupQuietMisdreavus-1/+1
2018-01-22Make correct resolver available in rustdocManish Goregaokar-1/+1
2018-01-22add RenderType to DocContextQuietMisdreavus-1/+6
2018-01-21Add themes optionGuillaume Gomez-1/+16
2018-01-19Allow runtime switching between trans backendsbjorn3-1/+3
2018-01-17Rollup merge of #47398 - GuillaumeGomez:pulldown-warnings, r=QuietMisdreavusGuillaume Gomez-5/+5
Switch to pulldown as default markdown renderer r? @QuietMisdreavus
2018-01-12Switch to pulldown as default markdown rendererGuillaume Gomez-5/+5
2018-01-10Use the new fs_read_write functions in rustc internalsMatt Brubeck-0/+1
2017-12-27rustdoc: add option to abort process on markdown differencesQuietMisdreavus-1/+7
2017-12-18Fix tidy issuevarkor-1/+2
2017-12-17Add an option to allow rustdoc to list modules by appearancevarkor-1/+6
The `--sort-modules-by-appearance` option will list modules in the order that they appear in the source, rather than sorting them alphabetically (as is the default). This resolves #8552.
2017-12-14Use PathBuf instead of String where applicableOliver Schneider-13/+13
2017-12-04rustc_back: replace tempdir with crates.io version.Irina-Gabriela Popa-0/+1
2017-11-30Show hidden items with rustdoc's document-privateChristian Duerr-1/+0
When using `#[doc(hidden)]` elements are hidden from docs even when the rustdoc flag `--document-private-items` is set. This behavior has been changed to display all hidden items when the flag is active.
2017-11-03Mark several ascii methods as unstable againLukas Kalbertodt-0/+1
We don't want to stabilize them now already. The goal of this set of commits is just to add inherent methods to the four types. Stabilizing all of those methods can be done later.
2017-11-03Copy `AsciiExt` methods to `char` directlyLukas Kalbertodt-1/+0
This is done in order to deprecate AsciiExt eventually.
2017-10-17Create a new flag, --document-private-itemssteveklabnik-0/+19
Fixes #44136
2017-10-17Deprecate several flags in rustdocsteveklabnik-0/+22
Part of #44136 Upgrades cargo due to https://github.com/rust-lang/cargo/pull/4451
2017-10-15rustbuild: Support specifying archiver and linker explicitlyVadim Petrochenkov-2/+6
2017-10-09let rustdoc print the crate version into docsQuietMisdreavus-0/+6
2017-09-11rustc: use ty::Const for the length of TyArray.Eduard-Mihai Burtescu-0/+1
2017-08-30Print warning whatever the rendering modeGuillaume Gomez-1/+0
2017-08-30Update unstable-crate testGuillaume Gomez-1/+1
2017-08-30Add warnings when rustdoc html rendering differsGuillaume Gomez-0/+2
2017-08-25*: remove crate_{name,type} attributesTamir Duberstein-3/+0
Fixes #41701.
2017-08-15Fix typos & us spellingsFourchaux-1/+1
2017-08-10Implemented #[doc(cfg(...))].kennytm-0/+1
This attribute has two effects: 1. Items with this attribute and their children will have the "This is supported on **** only" message attached in the documentation. 2. The items' doc tests will be skipped if the configuration does not match.
2017-07-27Build rustdoc on-demand.Mark Simulacrum-0/+1
Rustdoc is no longer compiled in every stage, alongside rustc, instead it is only compiled when requested, and generally only for the last stage.
2017-06-22Rollup merge of #42806 - ollie27:rustbuild_compiler_docs, r=alexcrichtonMark Simulacrum-1/+5
rustbuild: Fix compiler docs yet again Add support for `-Z force-unstable-if-unmarked` to rustdoc. r? @alexcrichton
2017-06-21rustbuild: Fix compiler docs yet againOliver Middleton-1/+5
Add support for `-Z force-unstable-if-unmarked` to rustdoc.
2017-06-20Switch to the crates.io `getopts` crateAlex Crichton-78/+133
This commit deletes the in-tree `getopts` crate in favor of the crates.io-based `getopts` crate. The main difference here is with a new builder-style API, but otherwise everything else remains relatively standard.
2017-06-19Bump version and stage0 compilerAlex Crichton-4/+0
2017-05-25Auto merge of #41700 - GuillaumeGomez:extend-css-stable, r=killercupbors-3/+4
Set --extend-css stable I think it's now time to set this option stable. r? @rust-lang/docs
2017-05-24Add precisions for the help message for --extend-cssGuillaume Gomez-2/+3
2017-05-18Give a nicer error for non-Unicode arguments to rustc and rustdocJosh Stone-2/+9
Previously, any non-Unicode argument would panic rustc: ``` $ rustc $'foo\x80bar' error: internal compiler error: unexpected panic note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: "foo�bar"', /checkout/src/libcore/result.rs:859 note: Run with `RUST_BACKTRACE=1` for a backtrace. ``` Now it gives a clean error: ``` $ rustc $'foo\x80bar' error: Argument 1 is not valid Unicode: "foo�bar" ``` Maybe fixes #15890, although we still can't *compile* arbitrary file names.
2017-05-13Rollup merge of #41826 - GuillaumeGomez:add-markdown-content, r=frewsxcvMark Simulacrum-1/+12
Add markdown-[before|after]-content options cc @nical r? @rust-lang/docs
2017-05-11rustc: Remove #![unstable] annotationAlex Crichton-3/+4
These are now no longer necessary with `-Z force-unstable-if-unmarked`
2017-05-08Add markdown-[before|after]-content optionsGuillaume Gomez-1/+12
2017-05-05Rollup merge of #41678 - GuillaumeGomez:rustdoc-test-warnings, r=alexcrichtonCorey Farwell-3/+8
Add option to display warnings in rustdoc Part of #41574. r? @alexcrichton The output for this file: ```rust /// ``` /// fn foo(x: u32) {} /// /// foo(2); /// let x = 1; /// panic!(); /// ``` fn foo() {} /// ``` /// fn foo(x: u32) {} /// /// foo(2); /// let x = 1; /// ``` fn foo2() {} /// ``` /// fn foo(x: u32) {} /// /// foo(2); /// let x = 1; /// panic!(); /// ``` fn foo3() {} fn main() { } ``` is the following: ``` > ./build/x86_64-apple-darwin/stage1/bin/rustdoc -Z unstable-options --display-warnings --test test.rs running 3 tests test test.rs - foo (line 1) ... FAILED test test.rs - foo3 (line 18) ... FAILED test test.rs - foo2 (line 10) ... ok successes: ---- test.rs - foo2 (line 10) stdout ---- warning: unused variable: `x` --> <anon>:2:8 | 2 | fn foo(x: u32) {} | ^ | = note: #[warn(unused_variables)] on by default warning: unused variable: `x` --> <anon>:5:5 | 5 | let x = 1; | ^ | = note: #[warn(unused_variables)] on by default successes: test.rs - foo2 (line 10) failures: ---- test.rs - foo (line 1) stdout ---- warning: unused variable: `x` --> <anon>:2:8 | 2 | fn foo(x: u32) {} | ^ | = note: #[warn(unused_variables)] on by default warning: unused variable: `x` --> <anon>:5:5 | 5 | let x = 1; | ^ | = note: #[warn(unused_variables)] on by default thread 'rustc' panicked at 'test executable failed: thread 'main' panicked at 'explicit panic', <anon>:6 note: Run with `RUST_BACKTRACE=1` for a backtrace. ', src/librustdoc/test.rs:317 note: Run with `RUST_BACKTRACE=1` for a backtrace. ---- test.rs - foo3 (line 18) stdout ---- warning: unused variable: `x` --> <anon>:2:8 | 2 | fn foo(x: u32) {} | ^ | = note: #[warn(unused_variables)] on by default warning: unused variable: `x` --> <anon>:5:5 | 5 | let x = 1; | ^ | = note: #[warn(unused_variables)] on by default thread 'rustc' panicked at 'test executable failed: thread 'main' panicked at 'explicit panic', <anon>:6 note: Run with `RUST_BACKTRACE=1` for a backtrace. ', src/librustdoc/test.rs:317 failures: test.rs - foo (line 1) test.rs - foo3 (line 18) test result: FAILED. 1 passed; 2 failed; 0 ignored; 0 measured ```
2017-05-03remove use of `ast_ty_to_ty_cache` from librustdocNiko Matsakis-0/+1
2017-05-02Add option to display warnings in rustdocGuillaume Gomez-3/+8