summary refs log tree commit diff
path: root/src/librustdoc/lib.rs
AgeCommit message (Collapse)AuthorLines
2018-10-24Destabilize 2018 editionPietro Albini-1/+1
This reverts commit 4d1ec818118c6c5dac5af19b291b9601ef98c17e.
2018-10-07Revert "Auto merge of #53793 - toidiu:ak-stabalize, r=nikomatsakis"Ariel Ben-Yehuda-0/+1
This reverts commit 6810f5286b6b91daab06fc3dccb27d8c46f14349, reversing changes made to 8586ec6980462c99a8926646201b2444d8938d29.
2018-09-15rustc: add unstable support for --extern crate_name without a path.Eduard-Mihai Burtescu-4/+7
2018-09-11stabalize infer outlives requirements (RFC 2093).toidiu-1/+0
Co-authored-by: nikomatsakis
2018-09-09Stabilize the 2018 editionMark Rousskov-1/+1
2018-09-01Rollup merge of #53076 - QuietMisdreavus:cfg-rustdoc, r=GuillaumeGomezkennytm-2/+4
set cfg(rustdoc) when rustdoc is running on a crate When using `#[doc(cfg)]` to document platform-specific items, it's a little cumbersome to get all the platforms' items to appear all at once. For example, the standard library adds `--cfg dox` to rustdoc's command line whenever it builds docs, and the documentation for `#![feature(doc_cfg)]` suggests using a Cargo feature to approximate the same thing. This is a little awkward, because you always need to remember to set `--features dox` whenever you build documentation. This PR proposes making rustdoc set `#[cfg(rustdoc)]` whenever it runs on a crate, to provide an officially-sanctioned version of this that is set automatically. This way, there's a standardized way to declare that a certain version of an item is specifically when building docs. To try to prevent the spread of this feature from happening too quickly, this PR also restricts the use of this flag to whenever `#![feature(doc_cfg)]` is active. I'm sure there are other uses for this, but right now i'm tying it to this feature. (If it makes more sense to give this its own feature, i can easily do that.)
2018-08-31feature(doc_cfg): set cfg(rustdoc) when rustdoc is runningQuietMisdreavus-2/+4
2018-08-31Auto merge of #51384 - QuietMisdreavus:extern-version, r=GuillaumeGomezbors-1/+29
rustdoc: add flag to control the html_root_url of dependencies The `--extern-html-root-url` flag in this PR allows one to override links to crates whose docs are not already available locally in the doc bundle. Docs.rs currently uses a version of this to make sure links to other crates go into that crate's docs.rs page. See the included test for intended use, but the idea is as follows: Calling rustdoc with `--extern-html-root-url crate=https://some-url.com` will cause rustdoc to override links that point to that crate to instead be replaced with a link rooted at `https://some-url.com/`. (e.g. for docs.rs this would be `https://docs.rs/crate/0.1.0` or the like.) Cheekily, rustup could use these options to redirect links to std/core/etc to instead point to locally-downloaded docs, if it so desired. Fixes https://github.com/rust-lang/rust/issues/19603
2018-08-27Auto merge of #53441 - toidiu:ak-fix53419, r=nikomatsakisbors-0/+1
fix for late-bound regions Fix for https://github.com/rust-lang/rust/issues/53419 r? @nikomatsakis
2018-08-25Auto merge of #53385 - matklad:stabilize-find-map, r=KodrAusbors-1/+0
Stablize Iterator::find_map Stabilization PR for https://github.com/rust-lang/rust/issues/49602
2018-08-24check that adding infer-outlives requirement to all crates worksNiko Matsakis-0/+1
2018-08-18Use the new Entry::or_default method where possible.Eduard-Mihai Burtescu-2/+2
2018-08-15Stablize Iterator::find_mapAleksey Kladov-1/+0
2018-08-09[nll] librustdoc: enable feature(nll) for bootstrapmemoryruins-0/+1
2018-08-06Auto merge of #52644 - varkor:lib-feature-gate-2, r=withoutboatsbors-3/+0
Add errors for unknown, stable and duplicate feature attributes - Adds an error for unknown (lang and lib) features. - Extends the lint for unnecessary feature attributes for stable features to libs features (this already exists for lang features). - Adds an error for duplicate (lang and lib) features. ```rust #![feature(fake_feature)] //~ ERROR unknown feature `fake_feature` #![feature(i128_type)] //~ WARNING the feature `i128_type` has been stable since 1.26.0 #![feature(non_exhaustive)] #![feature(non_exhaustive)] //~ ERROR duplicate `non_exhaustive` feature attribute ``` Fixes #52053, fixes #53032 and address some of the problems noted in #44232 (though not unused features). There are a few outstanding problems, that I haven't narrowed down yet: - [x] Stability attributes on macros do not seem to be taken into account. - [x] Stability attributes behind `cfg` attributes are not taken into account. - [x] There are failing incremental tests.
2018-08-05Remove bad features after rebasevarkor-1/+0
2018-08-05Remove unnecessary feature attributes that sneaked invarkor-2/+0
2018-08-04introduce "early passes" an convert a few overQuietMisdreavus-60/+6
2018-08-04strongly-typed passesQuietMisdreavus-4/+10
2018-08-04Rollup merge of #53003 - GuillaumeGomez:stabilize-rustdoc-options, ↵kennytm-2/+2
r=QuietMisdreavus Stabilize --color and --error-format options in rustdoc Fixes #52980 cc @kennytm r? @QuietMisdreavus
2018-08-02Stabilize --color and --error-format options in rustdocGuillaume Gomez-2/+2
2018-07-31Remove global derive_id and reset_ids functionsMark Rousskov-2/+4
Previously these functions relied on TLS but we can instead thread the relevant state through explicitly.
2018-07-30Delete unused code in rustdocMark Rousskov-21/+22
2018-07-29Replace push loops with collect() and extend() where possibleljedrz-3/+1
2018-07-26rustdoc: rework how default passes are chosenQuietMisdreavus-26/+23
2018-07-24remove zombie codesteveklabnik-5/+0
2018-07-24remove pluginmanagersteveklabnik-10/+11
2018-07-20Auto merge of #52354 - QuietMisdreavus:rustdoc-lints, r=GuillaumeGomezbors-5/+5
stabilize lint handling in rustdoc When https://github.com/rust-lang/rust/pull/51732 added CLI flags to manipulate lints in rustdoc, they were added as unstable flags. This made sense as they were new additions, but since they mirrored the flags that rustc has, it's worth considering them to not need an unstable period. Stabilizing them also provides the opportunity for a critical fix: allowing Cargo to pass `--cap-lints allow` when documenting dependencies, the same as when it compiles them. r? @rust-lang/rustdoc
2018-07-18rustc: distinguish compilation failure from ICEAndy Russell-3/+8
This commit changes the exit status of rustc to 1 in the presence of compilation errors. In the event of an unexpected panic (ICE) the standard panic error exit status of 101 remains. A run-make test is added to ensure that the exit code does not regress, and compiletest is updated to check for an exit status of 1 or 101, depending on the mode and suite. This is a breaking change for custom drivers. Fixes #51971.
2018-07-13stabilize lint handling in rustdocQuietMisdreavus-5/+5
2018-07-12Auto merge of #52194 - steveklabnik:remove-plugins, ↵bors-10/+11
r=QuietMisdreavus,GuillaumeGomez Remove rustdoc's plugins feature This fixes CVE-2018-1000622. https://cve.mitre.org/cgi-bin/cvename.cgi?name=%20CVE-2018-1000622 r? @QuietMisdreavus @GuillaumeGomez
2018-07-10Remove rustdoc pluginssteveklabnik-10/+11
See CVE-2018-1000622.
2018-07-05Auto merge of #51732 - GuillaumeGomez:cmd-line-lint-rustdoc, r=QuietMisdreavusbors-1/+27
Add command line lint manipulation in rustdoc Fixes #50082. r? @QuietMisdreavus
2018-07-05Add command line lint manipulation in rustdocGuillaume Gomez-1/+27
2018-06-24Haiku: set stack size to 16 MB on Haiku, use 32 MB on other platformsNiels Sascha Reedijk-2/+6
2018-06-21Auto merge of #48149 - varkor:generics-generalisation, r=petrochenkovbors-0/+1
The Great Generics Generalisation: HIR Edition This is essentially a followup to https://github.com/rust-lang/rust/pull/45930, consolidating the use of separate lifetime and type vectors into single kinds vectors wherever possible. This is intended to provide more of the groundwork for const generics (https://github.com/rust-lang/rust/issues/44580). r? @eddyb cc @yodaldevoid
2018-06-20Replace tempdir by tempfile in librustdocBastien Orivel-1/+1
2018-06-20Remove all traces of lifetimes() and types() methodsvarkor-0/+1
2018-06-12rustdoc: add --extern-html-root-url flagQuietMisdreavus-1/+29
2018-06-03Show which line the link is coming from.kennytm-0/+1
2018-05-17Auto merge of #50629 - Mark-Simulacrum:stage-step, r=alexcrichtonbors-2/+0
Switch to bootstrapping from 1.27 It's possible the Float trait could be removed from core, but I couldn't tell whether it was intended to be removed or not. @SimonSapin may be able to comment more here; we can presumably also do that in a follow up PR as this one is already quite large.
2018-05-17Switch to 1.26 bootstrap compilerMark Simulacrum-2/+0
2018-05-17Rename trans to codegen everywhere.Irina Popa-1/+1
2018-05-16Rollup merge of #50669 - QuietMisdreavus:deprecated-attrs, r=GuillaumeGomezkennytm-2/+32
rustdoc: deprecate `#![doc(passes, plugins, no_default_passes)]` Closes https://github.com/rust-lang/rust/issues/48164 Blocked on https://github.com/rust-lang/rust/pull/50541 - this includes those changes, which were necessary to create the UI test cc https://github.com/rust-lang/rust/issues/44136 Turns out, there were special attributes to mess with rustdoc passes and plugins! Who knew! Since we deprecated the CLI flags for this functionality, it makes sense that we do the same for the attributes. This PR also introduces a `#![doc(document_private_items)]` attribute, to match the `--document-private-items` flag introduced in https://github.com/rust-lang/rust/pull/44138 when the passes/plugins flags were deprecated. I haven't done a search to see whether these attributes are being used at all, but if the flags were any indication, i don't expect to see any users of these.
2018-05-16Auto merge of #50541 - QuietMisdreavus:rustdoc-errors, r=GuillaumeGomezbors-67/+60
rustdoc: replace most (e)println! statements with structured warnings/errors Turns out, the rustc diagnostic handler doesn't need a whole lot of setup that we weren't already doing. For errors that occur outside a "dealing with source code" context, we can just use the format/color config we were already parsing and make up a `Handler` that we can emit structured warnings/errors from. So i did that. This will make it way easier to test things with `rustdoc-ui` tests, since those require the JSON error output. (In fact, this PR is a yak shave for a different one where i was trying to do just that. `>_>`)
2018-05-15Rollup merge of #50632 - GuillaumeGomez:minification, r=ollie27Guillaume Gomez-1/+9
Add minification process r? @QuietMisdreavus
2018-05-14drop unnecessary "warning" from warning textQuietMisdreavus-1/+1
2018-05-14deprecate #![doc(no_default_passes, passes, plugins)]QuietMisdreavus-2/+32
2018-05-14tidyQuietMisdreavus-1/+2
2018-05-14replace error/warning println with structured diagQuietMisdreavus-67/+59