summary refs log tree commit diff
path: root/src/librustdoc/clean/inline.rs
AgeCommit message (Collapse)AuthorLines
2023-06-14remove drain-on-drop behavior from vec::DrainFilter and add #[must_use]The 8472-3/+3
2023-06-07rustdoc: re-elide cross-crate default trait object lifetime boundsLeón Orell Valerian Liehr-5/+14
2023-05-27Clean up usage of `cx.tcx` when `tcx` is already set into a variableGuillaume Gomez-2/+2
2023-05-04IAT: Rustdoc integrationLeón Orell Valerian Liehr-1/+6
2023-05-02resolve: One more attempt to simplify `module_children`Vadim Petrochenkov-1/+2
2023-04-16Spelling librustdocJosh Soref-1/+1
* associated * collected * correspondence * inlining * into * javascript * multiline * variadic Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-14Rollup merge of #110279 - GuillaumeGomez:compiler-macro-derive, r=notriddleMatthias Krüger-10/+16
rustdoc: Correctly handle built-in compiler proc-macros as proc-macro and not macro Part of https://github.com/rust-lang/rust/issues/110111. There were actually one issue split in two parts: * Compiler built-in proc-macro were incorrectly considered as macros and not proc-macros. * Re-exports of compiler built-in proc-macros were considering them as macros. Both issues can be fixed by looking at the `MacroKind` variant instead of just relying on information extracted later on. r? ``@fmease``
2023-04-13Correctly handle built-in compiler proc-macros as proc-macro and not macroGuillaume Gomez-10/+16
2023-04-12resolve: Pre-compute non-reexport module childrenVadim Petrochenkov-1/+1
Instead of repeating the same logic by walking HIR during metadata encoding. The only difference is that we are no longer encoding `macro_rules` items, but we never currently need them as a part of this list. They can be encoded separately if this need ever arises. `module_reexports` is also un-querified, because I don't see any reasons to make it a query, only overhead.
2023-04-08rustc_middle: Remove `Option` from `module_reexports` queryVadim Petrochenkov-1/+0
2023-04-08resolve: Preserve reexport chains in `ModChild`renVadim Petrochenkov-1/+1
This may be potentially useful for - avoiding uses of `hir::ItemKind::Use` - preserving documentation comments on all reexports - preserving and checking stability/deprecation info on reexports - all kinds of diagnostics
2023-03-21rustdoc: Cleanup parent module tracking for doc linksVadim Petrochenkov-52/+23
Keep ids of the documented items themselves, not their parent modules. Parent modules can be retreived from those ids when necessary.
2023-02-16remove bound_type_of query; make type_of return EarlyBinder; change type_of ↵Kyle Matsuda-12/+7
in metadata
2023-02-16change usages of type_of to bound_type_ofKyle Matsuda-4/+20
2023-02-15Use more let chainGuillaume Gomez-15/+12
2023-01-26change fn_sig query to use EarlyBinder; remove bound_fn_sig query; add ↵Kyle Matsuda-1/+1
EarlyBinder to fn_sig in metadata
2023-01-26replace usages of fn_sig query with bound_fn_sigKyle Matsuda-1/+1
2023-01-22rustdoc: Use `DefId(Map,Set)` instead of `FxHash(Map,Set)`Vadim Petrochenkov-10/+6
Not all uses are converted, a few cases iterating through maps/sets and requiring nontrivial changes are kept.
2023-01-17rustdoc: Fix glob import inliningVadim Petrochenkov-3/+19
Filter away names that are not actually imported by the glob, e.g. because they are shadowed by something else
2023-01-14change impl_trait_ref query to return EarlyBinder; remove ↵Kyle Matsuda-1/+1
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-1/+1
2023-01-10Remove unneeded ItemId::Primitive variantGuillaume Gomez-1/+3
2022-12-15Rollup merge of #105743 - nnethercote:SimplifiedType-cleanups, r=lcnrMatthias Krüger-1/+1
`SimplifiedType` cleanups r? `@lcnr`
2022-12-15Merge `SimplifiedTypeGen<D>` into `SimplifiedType`.Nicholas Nethercote-1/+1
`SimplifiedTypeGen<DefId>` is the only instantiation used, so we don't need the generic parameter.
2022-12-12Round 2: make clean_middle_ty take a binderOli Scherer-4/+4
2022-12-12Round 1: add some binders (fails due to losing bound vars and then rebinding ↵Oli Scherer-1/+2
them with `Binder::dummy`)
2022-11-21Unreserve braced enum variants in value namespaceVadim Petrochenkov-1/+1
2022-11-08Auto merge of #104013 - notriddle:notriddle/rustdoc-sizeof, r=GuillaumeGomezbors-2/+2
rustdoc: use `ThinVec` and `Box<str>` to shrink `clean::ItemKind`
2022-11-05rustdoc: use `ThinVec` and `Box<str>` to shrink `clean::ItemKind`Michael Howell-2/+2
2022-11-04rustdoc: create helper `GenericParamDef::lifetime`León Orell Valerian Liehr-4/+1
2022-11-04rustdoc: render late-bound lifetimes in generic parameter list of ↵León Orell Valerian Liehr-2/+14
cross-crate functions and methods
2022-11-03Remove rustdoc clean::Visibility typeGuillaume Gomez-3/+2
2022-11-02Auto merge of #103690 - GuillaumeGomez:visibility-on-demand, r=notriddlebors-22/+7
Make rustdoc Item::visibility computed on-demand This is a take-over of https://github.com/rust-lang/rust/pull/91408. Helps with https://github.com/rust-lang/rust/issues/90852 (needs to use `ty::Visibility` directly too). cc `@camelid` r? `@notriddle`
2022-10-30Rollup merge of #103746 - notriddle:notriddle/incoherent-dyn-trait, ↵Michael Howell-0/+15
r=GuillaumeGomez rustdoc: add support for incoherent impls on structs and traits Fixes #103170
2022-10-30Make rustdoc Item::visibility computed on-demandGuillaume Gomez-22/+7
2022-10-29rustdoc: add support for incoherent impls on structs and traitsMichael Howell-0/+15
Fixes #103170
2022-10-29rustdoc: Split effective visibilities from rustc from similar data built by ↵Vadim Petrochenkov-2/+2
rustdoc for external def-ids
2022-10-29Auto merge of #102233 - petrochenkov:effvis, r=jackh726bors-2/+2
privacy: Rename "accessibility levels" to "effective visibilities" And a couple of other naming and comment tweaks. Related to https://github.com/rust-lang/rust/issues/48054 For `enum Level` I initially used naming `enum EffectiveVisibilityLevel`, but it was too long and inconvenient because it's used pretty often. So I shortened it to just `Level`, if it needs to be used from some context where this name would be ambiguous, then it can be imported with renaming like `use rustc_middle::privacy::Level as EffVisLevel` or something.
2022-10-26privacy: Rename "accessibility levels" to "effective visibilities"Vadim Petrochenkov-2/+2
And a couple of other naming tweaks Related to https://github.com/rust-lang/rust/issues/48054
2022-10-25Don't merge inline doc comments for impl blocksGuillaume Gomez-8/+35
2022-10-09ImplItemKind::TyAlias => ImplItemKind::TypeMichael Goulet-1/+1
2022-09-27rustdoc: remove `clean::TraitWithExtraInfo`Michael Howell-4/+0
Instead, it gathers the extra info later, when it's actually requested.
2022-09-01Auto merge of #100869 - nnethercote:replace-ThinVec, r=spastorinobors-2/+3
Replace `rustc_data_structures::thin_vec::ThinVec` with `thin_vec::ThinVec` `rustc_data_structures::thin_vec::ThinVec` looks like this: ``` pub struct ThinVec<T>(Option<Box<Vec<T>>>); ``` It's just a zero word if the vector is empty, but requires two allocations if it is non-empty. So it's only usable in cases where the vector is empty most of the time. This commit removes it in favour of `thin_vec::ThinVec`, which is also word-sized, but stores the length and capacity in the same allocation as the elements. It's good in a wider variety of situation, e.g. in enum variants where the vector is usually/always non-empty. The commit also: - Sorts some `Cargo.toml` dependency lists, to make additions easier. - Sorts some `use` item lists, to make additions easier. - Changes `clean_trait_ref_with_bindings` to take a `ThinVec<TypeBinding>` rather than a `&[TypeBinding]`, because this avoid some unnecessary allocations. r? `@spastorino`
2022-08-29Replace `rustc_data_structures::thin_vec::ThinVec` with `thin_vec::ThinVec`.Nicholas Nethercote-2/+3
`rustc_data_structures::thin_vec::ThinVec` looks like this: ``` pub struct ThinVec<T>(Option<Box<Vec<T>>>); ``` It's just a zero word if the vector is empty, but requires two allocations if it is non-empty. So it's only usable in cases where the vector is empty most of the time. This commit removes it in favour of `thin_vec::ThinVec`, which is also word-sized, but stores the length and capacity in the same allocation as the elements. It's good in a wider variety of situation, e.g. in enum variants where the vector is usually/always non-empty. The commit also: - Sorts some `Cargo.toml` dependency lists, to make additions easier. - Sorts some `use` item lists, to make additions easier. - Changes `clean_trait_ref_with_bindings` to take a `ThinVec<TypeBinding>` rather than a `&[TypeBinding]`, because this avoid some unnecessary allocations.
2022-08-28Remove Attrs type aliasGuillaume Gomez-8/+6
2022-08-25Fix missing cfg propagation for reexportsGuillaume Gomez-1/+1
2022-08-16rustdoc: box ItemKind::TraitMichael Howell-1/+1
This reduces the memory consumption of ItemKind.
2022-08-16rustdoc: factor Type::QPath out into its own boxMichael Howell-1/+1
This reduces the size of Type.
2022-08-10remove Clean trait implementation for ty::AssocItemGuillaume Gomez-5/+6
2022-08-10Rollup merge of #100319 - GuillaumeGomez:rm-clean-impls-2, r=Dylan-DPCMatthias Krüger-4/+4
Remove more Clean trait implementations Follow-up of https://github.com/rust-lang/rust/pull/99638. r? ``@Dylan-DPC``