summary refs log tree commit diff
path: root/src/librustdoc/lib.rs
AgeCommit message (Collapse)AuthorLines
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
2017-05-02Set --extend-css stableGuillaume Gomez-3/+3
2017-04-22Re-enable hoedown by defaultGuillaume Gomez-4/+16
2017-04-20Fix line display for hoedownGuillaume Gomez-0/+1
2017-04-16rustc: expose monomorphic const_eval through on-demand.Eduard-Mihai Burtescu-1/+0
2017-03-28Update to last pulldown versionGuillaume Gomez-1/+1
2017-03-28Replace hoedown with pull in rustdocGuillaume Gomez-0/+1
2017-03-23Remove internal liblogAlex Crichton-0/+2
This commit deletes the internal liblog in favor of the implementation that lives on crates.io. Similarly it's also setting a convention for adding crates to the compiler. The main restriction right now is that we want compiler implementation details to be unreachable from normal Rust code (e.g. requires a feature), and by default everything in the sysroot is reachable via `extern crate`. The proposal here is to require that crates pulled in have these lines in their `src/lib.rs`: #![cfg_attr(rustbuild, feature(staged_api, rustc_private))] #![cfg_attr(rustbuild, unstable(feature = "rustc_private", issue = "27812"))] This'll mean that by default they're not using these attributes but when compiled as part of the compiler they do a few things: * Mark themselves as entirely unstable via the `staged_api` feature and the `#![unstable]` attribute. * Allow usage of other unstable crates via `feature(rustc_private)` which is required if the crate relies on any other crates to compile (other than std).
2017-01-26Fix full path being output with `rustdoc -h`Michael Gattozzi-1/+1
rustdoc would output the full path to the binary when calling it with the `-h` or `--help` flags. This is undesired behavior. It has been replaced with a hardcoded string `rustdoc` to fix the issue. Fixes #39310
2017-01-08Auto merge of #38813 - eddyb:lazy-11, r=nikomatsakisbors-1/+0
[11/n] Separate ty::Tables into one per each body. _This is part of a series ([prev](https://github.com/rust-lang/rust/pull/38449) | [next]()) of patches designed to rework rustc into an out-of-order on-demand pipeline model for both better feature support (e.g. [MIR-based](https://github.com/solson/miri) early constant evaluation) and incremental execution of compiler passes (e.g. type-checking), with beneficial consequences to IDE support as well. If any motivation is unclear, please ask for additional PR description clarifications or code comments._ <hr> In order to track the results of type-checking and inference for incremental recompilation, they must be stored separately for each function or constant value, instead of lumped together. These side-`Tables` also have to be tracked by various passes, as they visit through bodies (all of which have `Tables`, even if closures share the ones from their parent functions). This is usually done by switching a `tables` field in an override of `visit_nested_body` before recursing through `visit_body`, to the relevant one and then restoring it - however, in many cases the nesting is unnecessary and creating the visitor for each body in the crate and then visiting that body, would be a much cleaner solution. To simplify handling of inlined HIR & its side-tables, their `NodeId` remapping and entries HIR map were fully stripped out, which means that `NodeId`s from inlined HIR must not be used where a local `NodeId` is expected. It might be possible to make the nodes (`Expr`, `Block`, `Pat`, etc.) that only show up within a `Body` have IDs that are scoped to that `Body`, which would also allow `Tables` to use `Vec`s. That last part also fixes #38790 which was accidentally introduced in a previous refactor.
2017-01-06rustc: keep track of tables everywhere as if they were per-body.Eduard-Mihai Burtescu-1/+0
2016-12-29Remove not(stage0) from deny(warnings)Alex Crichton-1/+1
Historically this was done to accommodate bugs in lints, but there hasn't been a bug in a lint since this feature was added which the warnings affected. Let's completely purge warnings from all our stages by denying warnings in all stages. This will also assist in tracking down `stage0` code to be removed whenever we're updating the bootstrap compiler.
2016-12-24Teach `rustdoc --test` about `--sysroot`, pass it when testing rustAidan Hobson Sayers-2/+3
This permits rustdoc tests to work in stage0
2016-12-15rustdoc: a formatting nitTshepang Lekhonkhobe-2/+3
2016-12-13Auto merge of #38179 - michael-zapata:rf/harmonise_rustdoc_errors, ↵bors-9/+23
r=GuillaumeGomez feat(rustdoc): harmonise error messages Based on unix tools wording, it follows a standard format: `program_name: context: error message`, potentially prompting the user to use the `--help` option. This is clearly meant to trigger some discussion on #38084, as messages still use `stdout` and `stderr` somewhat arbitrarily, and there are a few `error!()` calls as well.
2016-12-12feat(rustdoc): harmonise error messagesMichael Zapata-9/+23
Based on unix tools wording, it follows a standard format: `program_name: context: error message` on stderr, prompting the user to use the `--help` option in case of misuse.
2016-12-12Auto merge of #38049 - frewsxcv:libunicode, r=alexcrichtonbors-1/+1
Rename 'librustc_unicode' crate to 'libstd_unicode'. Fixes https://github.com/rust-lang/rust/issues/26554.
2016-12-01Auto merge of #37911 - liigo:rustdoc-playground, r=alexcrichtonbors-9/+6
rustdoc: get back missing crate-name when --playground-url is used follow up PR #37763 r? @alexcrichton (since you r+ed to #37763 ) ---- Edit: When `#![doc(html_playground_url="")]` is used, the current crate name is saved to `PLAYGROUND`, so rustdoc may generate `extern crate NAME;` into code snips automatically. But when `--playground-url` was introduced in PR #37763, I forgot saving crate name to `PLAYGROUND`. This PR fix that. ---- Update: - add test - unstable `--playground-url`
2016-11-30Update the bootstrap compilerAlex Crichton-2/+0
Now that we've got a beta build, let's use it!
2016-11-30Rename 'librustc_unicode' crate to 'libstd_unicode'.Corey Farwell-1/+1
Fixes #26554.
2016-11-30rustdoc: fix up --playground-urlLiigo Zhuang-5/+2
2016-11-30unstable --playground-url, add test codeLiigo Zhuang-4/+4
2016-11-24rustdoc: use libsyntax ast::Attribute instead of "cleaning" them.Eduard-Mihai Burtescu-83/+89
2016-11-14rustdoc: add cli argument `--playground-url`Liigo-0/+8
2016-11-03Stabilize `..` in tuple (struct) patternsVadim Petrochenkov-1/+1
2016-10-31Changed most vec! invocations to use square bracesiirelu-2/+2
Most of the Rust community agrees that the vec! macro is clearer when called using square brackets [] instead of regular brackets (). Most of these ocurrences are from before macros allowed using different types of brackets. There is one left unchanged in a pretty-print test, as the pretty printer still wants it to have regular brackets.
2016-10-12Stabilise `?`Nick Cameron-1/+1
cc [`?` tracking issue](https://github.com/rust-lang/rust/issues/31436)
2016-10-02Cleanup `return` statements.Corey Farwell-4/+3
2016-09-26Rollup merge of #36729 - frewsxcv:rustdoc, r=alexcrichtonJonathan Turner-35/+11
librustdoc refactoring and cleanup. See each commit for more information. Biggest changes here is the addition of a `passes` module and each pass now lives in its own submodule.
2016-09-25Move pass contants/types into the new `pass` module.Corey Farwell-33/+8