summary refs log tree commit diff
path: root/src/librustdoc/lib.rs
AgeCommit message (Collapse)AuthorLines
2018-10-29Remove redundant cloneShotaro Yamada-1/+1
2018-09-27Bump to 1.31.0 and bootstrap from 1.30 betaJosh Stone-1/+1
2018-09-22Rollup merge of #54371 - QuietMisdreavus:rustdoc-ui-testing, r=GuillaumeGomezPietro Albini-3/+9
add -Zui-testing to rustdoc Before we depend on the `rustdoc-ui` tests some more, let's make rustdoc act the same as the compiler when they're actually being executed.
2018-09-20shuffle ownership of `external_traits`QuietMisdreavus-0/+1
constraints: - clean/inline.rs needs this map to fill in traits when inlining - fold.rs needs this map to allow passes to fold trait items - html/render.rs needs this map to seed the Cache.traits map of all known traits The first two are the real problem, since `DocFolder` only operates on `clean::Crate` but `clean/inline.rs` only sees the `DocContext`. The introduction of early passes means that these two now exist at the same time, so they need to share ownership of the map. Even better, the use of `Crate` in a rustc thread pool means that it needs to be Sync, so it can't use `Lrc<Lock>` to manually activate thread-safety. `parking_lot` is reused from elsewhere in the tree to allow use of its `ReentrantMutex`, as the relevant parts of rustdoc are still single-threaded and this allows for easier use in that context.
2018-09-20don't index trait impls if the trait isn't also documentedQuietMisdreavus-0/+1
2018-09-19add -Zui-testing to rustdocQuietMisdreavus-3/+9
2018-09-18Rollup merge of #54205 - GuillaumeGomez:treat-err-as-bug, r=QuietMisdreavusGuillaume Gomez-3/+10
Add treat-err-as-bug flag in rustdoc cc @nikomatsakis r? @QuietMisdreavus
2018-09-15rustc: add unstable support for --extern crate_name without a path.Eduard-Mihai Burtescu-4/+7
2018-09-13Add treat-err-as-bug flag in rustdocGuillaume Gomez-3/+10
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.