about summary refs log tree commit diff
path: root/src/librustdoc/clean
AgeCommit message (Collapse)AuthorLines
2023-01-28Rollup merge of #107357 - ↵Yuki Okushi-1/+3
GuillaumeGomez:fix-infinite-loop-in-rustdoc-get_all_import_attributes, r=notriddle Fix infinite loop in rustdoc get_all_import_attributes function Fixes https://github.com/rust-lang/rust/issues/107350. We'll also need to backport this fix to beta. r? `@notriddle`
2023-01-27Auto merge of #107055 - kylematsuda:eb-fn-sig, r=lcnrbors-4/+4
Switch to `EarlyBinder` for `fn_sig` query Part of the work to finish #105779 (also see https://github.com/rust-lang/types-team/issues/78). Several queries `X` have a `bound_X` variant that wraps the output in [`EarlyBinder`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/subst/struct.EarlyBinder.html). This adds `EarlyBinder` to the return type of the `fn_sig` query and removes `bound_fn_sig`. r? `@lcnr`
2023-01-27Fix handling of items inside a `doc(hidden)` blockGuillaume Gomez-10/+6
2023-01-27Fix infinite loop in rustdoc get_all_import_attributes functionGuillaume Gomez-1/+3
2023-01-27Auto merge of #107054 - petrochenkov:effvisdoc3, r=GuillaumeGomezbors-5/+0
rustdoc: Collect "rustdoc-reachable" items during early doc link resolution This pass only needs to know about visibilities, attributes and reexports, so it can be run early, similarly to `compute_effective_visibilities` in rustc. Results of this pass can be used to prune the list of extern impls early thus improving performance of https://github.com/rust-lang/rust/pull/94857.
2023-01-26change fn_sig query to use EarlyBinder; remove bound_fn_sig query; add ↵Kyle Matsuda-4/+4
EarlyBinder to fn_sig in metadata
2023-01-26replace usages of fn_sig query with bound_fn_sigKyle Matsuda-4/+4
2023-01-26rustdoc: Stop using `HirId`sVadim Petrochenkov-33/+19
Use `LocalDefId`s instead
2023-01-25rustdoc: Collect rustdoc-reachable items during early doc link resolutionVadim Petrochenkov-5/+0
2023-01-23Auto merge of #107136 - petrochenkov:dochidden, r=cjgillotbors-8/+1
rustc_metadata: Encode `doc(hidden)` flag to metadata To retrieve these flags rustdoc currently has to mass decode full attributes for items in the whole crate tree, so it's better to pre-compute it in advance. This is especially important for short-term performance of https://github.com/rust-lang/rust/pull/107054 because resolver cannot use memoization of query results yet.
2023-01-22rustdoc: Use `DefId(Map,Set)` instead of `FxHash(Map,Set)`Vadim Petrochenkov-15/+11
Not all uses are converted, a few cases iterating through maps/sets and requiring nontrivial changes are kept.
2023-01-21rustc_metadata: Encode `doc(hidden)` flag to metadataVadim Petrochenkov-8/+1
To retrieve these flags rustdoc currently has to mass decode full attributes for items in the whole crate tree, so it's better to pre-compute it in advance. This is especially for short-term performance of https://github.com/rust-lang/rust/pull/107054 because resolver cannot use memoization of query results yet.
2023-01-17rustdoc: Fix glob import inliningVadim Petrochenkov-4/+21
Filter away names that are not actually imported by the glob, e.g. because they are shadowed by something else
2023-01-15rustdoc: simplify some & ref erencesMatthias Krüger-10/+8
2023-01-14change impl_trait_ref query to return EarlyBinder; remove ↵Kyle Matsuda-3/+3
bound_impl_trait_ref query; add EarlyBinder to impl_trait_ref in metadata
2023-01-14change usages of impl_trait_ref to bound_impl_trait_refKyle Matsuda-2/+2
2023-01-14change const_param_default query to return EarlyBinder; remove ↵Kyle Matsuda-1/+1
bound_const_param_default query; add EarlyBinder to const_param_default in metadata
2023-01-14change usages of const_param_default query to bound_const_param_defaultKyle Matsuda-1/+3
2023-01-12Fix rendering 'const' for intrinsicsclubby789-2/+10
2023-01-10Remove unneeded ItemId::Primitive variantGuillaume Gomez-10/+6
2023-01-06rustdoc: Strip imports of items which are `#[doc(hidden)]`Nixon Enraght-Moony-0/+11
Closes #106379
2023-01-03clean: Remove `ctor_kind` from `VariantStruct`.Nixon Enraght-Moony-3/+0
It's always `None`.
2023-01-02Rollup merge of #106366 - ↵Michael Goulet-1/+1
GuillaumeGomez:fix-rustdoc-ice-typedef-type-mismatch, r=notriddle Fix rustdoc ICE on bad typedef with mismatching types Fixes https://github.com/rust-lang/rust/issues/106226. Fixes #105742. Fixes #105737. Fixes #105334. Fixes #96287. In this case, it's ok to replace the panic with `rustc_error::raise` because the compiler provided us with a `Error`. r? `@notriddle`
2023-01-02Fix rustdoc ICE on bad typedef with mismatching typesGuillaume Gomez-1/+1
2023-01-01clean: Always store enum disriminant.Nixon Enraght-Moony-23/+43
2022-12-29Auto merge of #106266 - matthiaskrgr:rollup-cxrdbzy, r=matthiaskrgrbors-1/+1
Rollup of 9 pull requests Successful merges: - #104531 (Provide a better error and a suggestion for `Fn` traits with lifetime params) - #105899 (`./x doc library --open` opens `std`) - #106190 (Account for multiple multiline spans with empty padding) - #106202 (Trim more paths in obligation types) - #106234 (rustdoc: simplify settings, help, and copy button CSS by not reusing) - #106236 (docs/test: add docs and a UI test for `E0514` and `E0519`) - #106259 (Update Clippy) - #106260 (Fix index out of bounds issues in rustdoc) - #106263 (Formatter should not try to format non-Rust files) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-29Fix index out of bounds issues in rustdocyukang-1/+1
2022-12-28Rename `Rptr` to `Ref` in AST and HIRNilstrieb-1/+1
The name makes a lot more sense, and `ty::TyKind` calls it `Ref` already as well.
2022-12-20Add readable rustdoc display for tvOS and watchOSTaiki Endo-0/+2
2022-12-15Rollup merge of #105743 - nnethercote:SimplifiedType-cleanups, r=lcnrMatthias Krüger-2/+2
`SimplifiedType` cleanups r? `@lcnr`
2022-12-15Merge `SimplifiedTypeGen<D>` into `SimplifiedType`.Nicholas Nethercote-2/+2
`SimplifiedTypeGen<DefId>` is the only instantiation used, so we don't need the generic parameter.
2022-12-14Ensure no one constructs `AliasTy`s themselvesOli Scherer-1/+1
2022-12-13Combine projection and opaque into aliasMichael Goulet-3/+5
2022-12-13squash OpaqueTy and ProjectionTy into AliasTyMichael Goulet-3/+3
2022-12-13ProjectionTy.item_def_id -> ProjectionTy.def_idMichael Goulet-4/+4
2022-12-13Use ty::OpaqueTy everywhereMichael Goulet-1/+1
2022-12-12Avoid trying to normalize unnormalizable typesOli Scherer-2/+6
2022-12-12Round 3: require binders for substsOli Scherer-28/+49
2022-12-12Round 2: make clean_middle_ty take a binderOli Scherer-56/+92
2022-12-12Round 1: add some binders (fails due to losing bound vars and then rebinding ↵Oli Scherer-26/+26
them with `Binder::dummy`)
2022-12-12Auto merge of #105160 - nnethercote:rm-Lit-token_lit, r=petrochenkovbors-14/+20
Remove `token::Lit` from `ast::MetaItemLit`. Currently `ast::MetaItemLit` represents the literal kind twice. This PR removes that redundancy. Best reviewed one commit at a time. r? `@petrochenkov`
2022-12-05Remove `mk_name_value_item{,_str}`.Nicholas Nethercote-14/+20
There are better ways to create the meta items. - In the rustdoc tests, the commit adds `dummy_meta_item_name_value`, which matches the existing `dummy_meta_item_word` function and `dummy_meta_item_list` macro. - In `types.rs` the commit clones the existing meta item and then modifies the clone.
2022-12-02Merge generics and where predicates and prevent duplicates in where predicatesGuillaume Gomez-33/+91
2022-12-01rustc_hir: Change representation of import paths to support multiple resolutionsVadim Petrochenkov-4/+27
2022-11-30Auto merge of #104905 - compiler-errors:normalization-changes, r=spastorinobors-2/+2
Some initial normalization method changes 1. Rename `AtExt::normalize` to `QueryNormalizeExt::query_normalize` (using the `QueryNormalizer`) 2. Introduce `NormalizeExt::normalize` to replace `partially_normalize_associated_types_in` (using the `AssocTypeNormalizer`) 3. Rename `FnCtxt::normalize_associated_types_in` to `FnCtxt::normalize` 4. Remove some unused other normalization fns in `Inherited` and `FnCtxt` Also includes one drive-by where we're no longer creating a `FnCtxt` inside of `check_fn`, but passing it in. This means we don't need such weird `FnCtxt` construction logic. Stacked on top of #104835 for convenience. r? types
2022-11-28partially_normalize_... -> At::normalizeMichael Goulet-1/+1
2022-11-28Rename At::normalize to At::query_normalizeMichael Goulet-1/+1
2022-11-28Rollup merge of #104804 - nnethercote:MetaItemLit, r=petrochenkovMatthias Krüger-3/+3
Rename `ast::Lit` as `ast::MetaItemLit`. And some other literal cleanups. r? `@petrochenkov`
2022-11-28Rollup merge of #104732 - WaffleLapkin:from_def_idn't, r=compiler-errorsDylan DPC-1/+1
Refactor `ty::ClosureKind` related stuff I've tried to fix all duplication and weirdness, but if I missed something do tell :p r? `@compiler-errors`
2022-11-28Rename `NestedMetaItem::[Ll]iteral` as `NestedMetaItem::[Ll]it`.Nicholas Nethercote-3/+3
We already use a mix of `Literal` and `Lit`. The latter is better because it is shorter without causing any ambiguity.