about summary refs log tree commit diff
path: root/src/librustdoc/lib.rs
AgeCommit message (Collapse)AuthorLines
2020-07-31Make rustdoc share the logger initialization routine with rustc.Oliver Scherer-2/+2
2020-07-30Update driver to add json backendJoseph Ryan-14/+30
2020-07-29Refactor DocFS to fix error handling bugsJoseph Ryan-3/+8
2020-07-27More requested changesJoseph Ryan-3/+3
2020-07-27Make requested changesJoseph Ryan-1/+1
2020-07-27Extract `Cache` and other types from `html` moduleJoseph Ryan-13/+2
2020-07-27Refactor html backend to use generic interfaceJoseph Ryan-1/+4
2020-07-27Move `Error` and `RenderInfo` out of `html` moduleJoseph Ryan-1/+3
2020-07-15Don't ICE on infinitely recursive typesJoshua Nelson-0/+2
`evaluate_obligation` can only be run on types that are already valid. So rustdoc still has to run typeck even though it doesn't care about the result.
2020-07-15Don't ICE on errors in function returning impl traitJoshua Nelson-0/+1
Instead, report the error. This emits the errors on-demand, without special-casing `impl Trait`, so it should catch all ICEs of this kind, including ones that haven't been found yet. Since the error is emitted during type-checking there is less info about the error; see comments in the code for details. - Add test case for -> impl Trait - Add test for impl trait with alias - Move EmitIgnoredResolutionErrors to rustdoc This makes `fn typeck_item_bodies` public, which is not desired behavior. That change should be removed once https://github.com/rust-lang/rust/pull/74070 is merged. - Don't visit nested closures twice
2020-07-10Change some function names.Nicholas Nethercote-1/+4
A couple of these are quite long, but they do a much better job of explaining what they do, which was non-obvious before.
2020-07-10Eliminate `rust_input`.Nicholas Nethercote-31/+23
It has a single call site and having it as a separate (higher-order!) function makes the code harder to read.
2020-07-02Remove render-redirect-pages option in rustdocGuillaume Gomez-7/+0
2020-06-20Remove uses of `Vec::remove_item`Lukas Kalbertodt-1/+0
2020-06-13Clean up some weird command stringsGuillaume Gomez-9/+7
2020-05-09End unification of exit codes in librustdocGuillaume Gomez-9/+18
2020-05-08Clean up rustdoc source codeGuillaume Gomez-1/+7
2020-04-16Dogfood or_patterns in rustdocJosh Stone-0/+1
2020-04-11Depend on getopts from crates.ioLuca Barbieri-1/+1
rustc_session exports it for other crates to avoid mismatching crate versions.
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-1/+1
2020-03-24rustc: remove rustc_hir_pretty dependency.Mazdak Farrokhzad-0/+1
2020-03-23Rollup merge of #69494 - GuillaumeGomez:stabilize-crate-version, ↵Mazdak Farrokhzad-1/+1
r=ehuss,aleksator,ollie27 Stabilize --crate-version option in rustdoc I don't see any reason to not stabilize it anymore, so let's go! cc @kinnison @ehuss r? @ollie27
2020-03-16use direct imports for `rustc::{lint, session}`.Mazdak Farrokhzad-2/+2
2020-03-14Make downstream crates compile.Camille GILLOT-0/+1
2020-02-29Rename `syntax` to `rustc_ast` in source codeVadim Petrochenkov-1/+1
2020-02-29Make it build againVadim Petrochenkov-1/+1
2020-02-26Stabilize --crate-version option in rustdocGuillaume Gomez-1/+1
2020-02-16Other crates.Camille GILLOT-0/+1
2020-02-07Remove unused feature gates from librustdocbjorn3-4/+0
2020-02-01syntax::print -> new crate rustc_ast_prettyMazdak Farrokhzad-0/+1
2020-02-01Move builtin attribute logic to new rustc_attr crate.Mazdak Farrokhzad-0/+1
For now, this is all the crate contains, but more attribute logic & types will be moved there over time.
2020-01-18remove rustc_error_codes deps except in rustc_driverMazdak Farrokhzad-1/+0
2020-01-12Rollup merge of #68089 - lzutao:revert-remote_item, r=sfacklerMazdak Farrokhzad-0/+1
Unstabilize `Vec::remove_item` As concerned by @kornelski, @LukasKalbertodt, and @gnzlbg in #40062. Reverts #67727
2020-01-12Rollup merge of #68045 - Centril:liberate-lints, r=Mark-SimulacrumMazdak Farrokhzad-0/+1
Move more of `rustc::lint` into `rustc_lint` Based on https://github.com/rust-lang/rust/pull/67806. Here we try to consolidate more of the linting infra into `rustc::lint`. Some high-level notes: - We now store an `Lrc<dyn Any + Send + Sync>` as opposed to `Lrc<LintStore>` in the `GlobalCtxt`. This enables us to avoid referring to the type, breaking a cyclic dependency, and so we can move things from `rustc::lint` to `rustc_lint`. - `in_derive_expansion` is, and needs to, be moved as a method on `Span`. - We reduce the number of ways on `tcx` to emit a lint so that the developer UX is more streamlined. - `LintLevelsBuilder` is moved to `rustc_lint::levels`, leaving behind `LintLevelMap/Set` in a purified form due to current constraints (hopefully fixable in the future after https://github.com/rust-lang/rust/pull/68133). - `struct_lint_level` is moved to `rustc::lint` due to current dependency constraints. - `rustc::lint::context` is moved to `rustc_lint::context`. - The visitors in `rustc::lint` are moved to `rustc_lint::passes`.
2020-01-11Rollup merge of #68114 - ecstatic-morse:fix-feature-gating, r=CentrilMazdak Farrokhzad-1/+0
Don't require `allow_internal_unstable` unless `staged_api` is enabled. #63770 changed `qualify_min_const_fn` to require `allow_internal_unstable` for *all* crates that used an unstable feature, regardless of whether `staged_api` was enabled or the `fn` that used that feature was stably const. In practice, this meant that every crate in the ecosystem that wanted to use nightly features added `#![feature(const_fn)]`, which skips `qualify_min_const_fn` entirely. After this PR, crates that do not have `#![feature(staged_api)]` will only need to enable the feature they are interested in. For example, `#![feature(const_if_match)]` will be enough to enable `if` and `match` in constants. Crates with `staged_api` (e.g., `libstd`) require `#[allow_internal_unstable]` to be added to a function if it uses nightly features unless that function is also marked `#[rustc_const_unstable]`. This prevents proliferation of `#[allow_internal_unstable]` into functions that are not callable in a `const` context on stable. r? @oli-obk (author of #63770) cc @Centril
2020-01-11lints: promote levels.rs to lint.rs & extract passes.rsMazdak Farrokhzad-0/+1
2020-01-11Revert "Rollup merge of #67727 - Dylan-DPC:stabilise/remove_item, ↵Lzu Tao-0/+1
r=alexcrichton" This reverts commit 4ed415b5478c74094c2859abfddb959588cd6bb1, reversing changes made to 3cce950743e8aa74a4378dfdefbbc80223a00865.
2020-01-10Remove unnecessary `const_fn` feature gatesDylan MacKenzie-1/+0
This flag opts out of the min-const-fn checks entirely, which is usually not what we want. The few cases where the flag is still necessary have been annotated.
2020-01-10nix syntax::errors & prefer rustc_errors over errorsMazdak Farrokhzad-2/+2
2020-01-09Rollup merge of #67875 - dtolnay:hidden, r=GuillaumeGomezYuki Okushi-0/+3
Distinguish between private items and hidden items in rustdoc 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. Fixes #67851. Closes #60884.
2020-01-08Move `is_min_const_fn` query to librustc_mir.Camille GILLOT-0/+1
The only two uses of the associated methods are in librustc_mir and librustdoc. Please tell me if there is a better choice.
2020-01-07Rollup merge of #67727 - Dylan-DPC:stabilise/remove_item, r=alexcrichtonYuki Okushi-1/+0
Stabilise vec::remove_item Closes #40062 r? @alexcrichton
2020-01-06remove usage of feature gatedylan_DPC-1/+0
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-0/+1
2020-01-04Distinguish between private items and hidden items in rustdocDavid Tolnay-0/+3
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-03rustdoc: Respect diagnostic debugging optionsVadim Petrochenkov-14/+4
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-1/+1
2019-12-31Rollup merge of #67735 - petrochenkov:uibool, r=Mark-SimulacrumDylan DPC-2/+2
Support `-Z ui-testing=yes/no` `ui-testing` is now a boolean option (`-Z ui-testing=yes/no`) and can be specified multiple times with later values overriding earlier values (`-Z ui-testing=yes -Z ui-testing=no` == `-Z ui-testing=no`), so it can be set in a hierarchical way, e.g. UI testing infra may enable it by default with specific tests being able to opt-out. This way we can remove the special opt-out support from `compiletest`. Inspired by https://github.com/rust-lang/rust/pull/67709.
2019-12-30Support `-Z ui-testing=yes/no`Vadim Petrochenkov-2/+2
2019-12-30Rename `libsyntax_ext` and `libsyntax_expand` in codeVadim Petrochenkov-1/+1