summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2020-01-23Distinguish between private items and hidden items in rustdocDavid Tolnay-73/+108
I believe rustdoc should not be conflating private items (visibility lower than `pub`) and hidden items (attribute `doc(hidden)`). This matters now that Cargo is passing --document-private-items by default for bin crates. In bin crates that rely on macros, intentionally hidden implementation details of the macros can overwhelm the actual useful internal API that one would want to document. This PR restores the strip-hidden pass when documenting private items, and introduces a separate unstable --document-hidden-items option to skip the strip-hidden pass. The two options are orthogonal to one another.
2020-01-23format librustdocMark Rousskov-775/+839
2020-01-17rustdoc: Don't allow `#![feature(...)]` on stable or betaOliver Middleton-2/+1
(cherry picked from commit 40571995984a0f2c466f77955e7d147887c2179b)
2019-12-16Rollup merge of #67336 - GuillaumeGomez:fix-js-error, r=Dylan-DPCMazdak Farrokhzad-1/+1
Fix JS error when loading page with search For example when you load this page: https://doc.rust-lang.org/nightly/std/num/struct.NonZeroI8.html?search=foo, you get a nice JS error: ``` TypeError: ev is undefined ``` r? @kinnison
2019-12-15Fix JS error when loading page with searchGuillaume Gomez-1/+1
2019-12-14Revert "Stabilize the `never_type`, written `!`."Niko Matsakis-1/+1
This reverts commit 15c30ddd69d6cc3fffe6d304c6dc968a5ed046f1.
2019-12-12replace serialize with serde in rustdocAndy Russell-69/+123
2019-12-11Rollup merge of #67074 - ehuss:extern-options, r=petrochenkovMazdak Farrokhzad-35/+6
Add options to --extern flag. This changes the `--extern` flag so that it can take a series of options that changes its behavior. The general syntax is `[opts ':'] name ['=' path]` where `opts` is a comma separated list of options. Two options are supported, `priv` which replaces `--extern-private` and `noprelude` which avoids adding the crate to the extern prelude. ```text --extern priv:mylib=/path/to/libmylib.rlib --extern noprelude:alloc=/path/to/liballoc.rlib ``` `noprelude` is to be used by Cargo's build-std feature in order to use `--extern` to reference standard library crates. This also includes a second commit which adds the `aux-crate` directive to compiletest. I can split this off into a separate PR if desired, but it helps with defining these kinds of tests. It is based on #54020, and can be used in the future to replace and simplify some of the Makefile tests.
2019-12-11Rollup merge of #67178 - GuillaumeGomez:move-non-clean-impls, r=kinnisonYuki Okushi-588/+608
Move non clean impls items This is another (and should be the last for the `clean` module) rustdoc cleanup. I tried to follow the same commit pattern as the last one to make the review as easy as possible. r? @kinnison
2019-12-11Rollup merge of #67152 - GuillaumeGomez:sort-auto-impls, r=kinnisonYuki Okushi-6/+28
Sort auto trait and blanket implementations display Fixes #63042 r? @kinnison
2019-12-10Remove tidy commentGuillaume Gomez-2/+0
2019-12-09Remove useless commentGuillaume Gomez-2/+0
2019-12-09Move RegionTarget and RegionDeps where they into clean/auto_traitGuillaume Gomez-14/+16
2019-12-09Remove unused importsGuillaume Gomez-10/+7
2019-12-09Fix usage of variants in clean/utilsGuillaume Gomez-7/+7
2019-12-09Make utils module publicGuillaume Gomez-19/+19
2019-12-09Fix missing importsGuillaume Gomez-1/+25
2019-12-09Remove functions from clean/mod.rsGuillaume Gomez-567/+0
2019-12-09Move clean functions to another fileGuillaume Gomez-0/+568
2019-12-09Add options to --extern flag.Eric Huss-35/+6
2019-12-08Auto merge of #66984 - GuillaumeGomez:move-clean-types, r=kinnisonbors-1534/+1558
Move clean types into their own file This PR is just about moving clean types into their own files to make the code more clear and keep all `Clean` trait implementations on their own. r? @kinnison
2019-12-08Sort auto trait and blanket implementations displayGuillaume Gomez-6/+28
2019-12-07Rollup merge of #66959 - GuillaumeGomez:cfg-duplicates, r=eddybYuki Okushi-0/+6
Remove potential cfgs duplicates Fixes https://github.com/rust-lang/rust/issues/66921. Before going any further (the issue seems to be linked to metadata as far as I can tell). Do you think this is the good place to do it or should it be done before? r? @eddyb
2019-12-05Auto merge of #66828 - GuillaumeGomez:less-minification, r=kinnisonbors-91/+14
Less minification The goal of this PR is to remove the minification process on the `search-index.js` file. It provides great result in term of space reduction but the computation time is far too long. I'll work on this issue and will put it back once it's fast enough. cc @nox @lqd r? @kinnison
2019-12-04Remove unused constantGuillaume Gomez-2/+0
2019-12-04Make Lifetime struct field publicGuillaume Gomez-1/+1
2019-12-04Make some formatting improvementsGuillaume Gomez-11/+4
2019-12-04Make some private methods publicGuillaume Gomez-7/+7
2019-12-04fixup clean/types.rs importsGuillaume Gomez-48/+26
2019-12-04remove code that doesn't belong in clean/types.rsGuillaume Gomez-2975/+0
2019-12-04Remove potential cfgs duplicatesGuillaume Gomez-0/+6
2019-12-03remove code that doesn't belong in clean/mod.rs anymoreGuillaume Gomez-1534/+13
2019-12-03Create new types.rs fileGuillaume Gomez-0/+4551
2019-12-02syntax: Use `ast::MacArgs` for macro definitionsVadim Petrochenkov-1/+1
2019-12-02Add missing backlineGuillaume Gomez-1/+1
2019-12-02minify theme.js as wellGuillaume Gomez-4/+3
2019-12-02Remove minification on search-index.js fileGuillaume Gomez-85/+9
2019-12-02Add missing checkGuillaume Gomez-1/+1
2019-11-30Rollup merge of #66895 - Centril:rustc_feature, r=oli-obkMazdak Farrokhzad-7/+8
Feature gating *declarations* => new crate `rustc_feature` This PR moves the data-oriented parts of feature gating into its own crate, `rustc_feature`. The parts consist of some data types as well as `accepted`, `active`, `removed`, and `builtin_attrs`. Feature gate checking itself remains in `syntax::feature_gate::check`. The parts which define how to emit feature gate errors could probably be moved to `rustc_errors` or to the new `rustc_session` crate introduced in #66878. The visitor itself could probably be moved as a pass in `rustc_passes` depending on how the dependency edges work out. The PR also contains some drive-by cleanup of feature gate checking. As such, the PR probably best read commit-by-commit. r? @oli-obk cc @petrochenkov cc @Mark-Simulacrum
2019-11-30move UnstableFeatures -> rustc_featureMazdak Farrokhzad-6/+6
2019-11-30introduce crate rustc_feature and move active, accepted, and removed to itMazdak Farrokhzad-1/+2
2019-11-29Rollup merge of #66791 - cjgillot:arena, r=Mark-SimulacrumRalf Jung-17/+20
Handle GlobalCtxt directly from librustc_interface query system This PR constructs the `GlobalCtxt` as a member of the `Queries` in librustc_interface. This simplifies the code to construct it, at the expense of added complexity in the query control flow. This allows to handle the arenas directly from librustc_interface. Based on #66707 r? @Zoxc
2019-11-28rustc_metadata: Merge `cstore.rs` into `creader.rs`Vadim Petrochenkov-1/+1
2019-11-27Use new ErrorKind enumGuillaume Gomez-10/+16
2019-11-27Replace Iterator::find calls with Iterator::any when betterGuillaume Gomez-6/+5
2019-11-27Add support for intra-doc link fields of enum variantGuillaume Gomez-7/+60
2019-11-27little intra-doc code cleanupGuillaume Gomez-16/+11
2019-11-27Auto merge of #66675 - GuillaumeGomez:support-anchors-intra-doc-links, ↵bors-78/+211
r=kinnison Support anchors intra doc links Fixes #62833 Part of #43466. cc @ollie27 r? @kinnison
2019-11-26Rollup merge of #66754 - estebank:rustdoc-capitalization, r=Dylan-DPCTyler Mandry-3/+3
Various tweaks to diagnostic output
2019-11-26Have Queries own the GlobalCtxt.Camille GILLOT-1/+1
The construction of the GlobalCtxt is moved from a generator's stack to the Queries struct. Since the GlobalCtxt requires the HIR Forest and the arenas to live longer, those are moved into Queries the same way. The resulting handling of objects is more brittle, because consumers of the Once objects need to be careful of their initialisation.