about summary refs log tree commit diff
path: root/src/librustdoc/clean/blanket_impl.rs
AgeCommit message (Collapse)AuthorLines
2025-07-02avoid suggesting traits from private dependenciesJeremy Smart-1/+1
2025-06-10rustdoc: Refractor `clean_ty_generics`Alona Enraght-Moony-5/+1
2025-03-26rustdoc: Rearrange `Item`/`ItemInner`.Nicholas Nethercote-4/+4
The `Item` struct is 48 bytes and contains a `Box<ItemInner>`; `ItemInner` is 104 bytes. This is an odd arrangement. Normally you'd have one of the following. - A single large struct, which avoids the allocation for the `Box`, but can result in lots of wasted space in unused parts of a container like `Vec<Item>`, `HashSet<Item>`, etc. - Or, something like `struct Item(Box<ItemInner>)`, which requires the `Box` allocation but gives a very small Item size, which is good for containers like `Vec<Item>`. `Item`/`ItemInner` currently gets the worst of both worlds: it always requires a `Box`, but `Item` is also pretty big and so wastes space in containers. It would make sense to push it in one direction or the other. #138916 showed that the first option is a regression for rustdoc, so this commit does the second option, which improves speed and reduces memory usage.
2024-10-29update toolslcnr-2/+2
2024-09-30rustdoc: rewrite stability inheritance as a passLukas Markeffsky-0/+1
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-1/+1
2024-09-07rustdoc: use a single box to store Attributes and ItemKindMichael Howell-35/+37
2024-08-31Rollup merge of #129774 - nnethercote:rm-extern-crate-tracing-remainder, ↵Matthias Krüger-0/+1
r=GuillaumeGomez Remove `#[macro_use] extern crate tracing` from rustdoc and rustfmt A follow-up to #129767 and earlier PRs doing this for `rustc_*` crates. r? ```@GuillaumeGomez```
2024-08-30Remove `#[macro_use] extern crate tracing` from rustdoc.Nicholas Nethercote-0/+1
2024-08-29Fix clippy lintsGuillaume Gomez-1/+1
2024-07-29Reformat `use` declarations.Nicholas Nethercote-1/+0
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-05-30Rename HIR `TypeBinding` to `AssocItemConstraint` and related cleanupLeón Orell Valerian Liehr-2/+2
2024-05-18Auto merge of #125077 - spastorino:add-new-fnsafety-enum2, r=jackh726bors-1/+1
Rename Unsafe to Safety Alternative to #124455, which is to just have one Safety enum to use everywhere, this opens the posibility of adding `ast::Safety::Safe` that's useful for unsafe extern blocks. This leaves us today with: ```rust enum ast::Safety { Unsafe(Span), Default, // Safe (going to be added for unsafe extern blocks) } enum hir::Safety { Unsafe, Safe, } ``` We would convert from `ast::Safety::Default` into the right Safety level according the context.
2024-05-17Rename Unsafe to SafetySantiago Pastorino-1/+1
2024-05-16Remove trivial Binder::dummy callsMichael Goulet-1/+1
2024-05-16Fix toolsMichael Goulet-2/+2
2024-04-08rustdoc: slightly clean up the synthesis of blanket implsLeón Orell Valerian Liehr-120/+109
2024-04-04use `DefineOpaqueTypes::Yes` in rustdocOli Scherer-1/+1
Since we have a `DefiningAnchor::Error`, we will reject registering hidden types already
2024-01-12Remove unused ErrorReporting variant from overflow handlingMichael Goulet-1/+0
2023-12-14rustdoc: avoid ParamEnv with infer varsAli MJ Al-Nasrawy-2/+1
ParamEnv's with inference variabels are invalid.
2023-08-16Improve code readability by moving fmt args directly into the stringGuillaume Gomez-2/+2
2023-07-22rustdoc: handle cross-crate RPITITs correctlyLeón Orell Valerian Liehr-1/+2
2023-07-14refactor(rustc_middle): Substs -> GenericArgMahdi Dibaiee-9/+9
2023-07-12Re-format let-else per rustfmt updateMark Rousskov-3/+7
2023-06-07rustdoc: re-elide cross-crate default trait object lifetime boundsLeón Orell Valerian Liehr-1/+7
2023-06-05cleanup some skip_binder -> subst_identityKyle Matsuda-3/+3
2023-05-29EarlyBinder::new -> EarlyBinder::bindlcnr-1/+1
2023-05-28Make EarlyBinder's inner value private; and fix all of the resulting errorsKyle Matsuda-6/+6
2023-05-28Replace EarlyBinder(x) with EarlyBinder::new(x)Kyle Matsuda-1/+1
2023-04-19Fix missing blanket impl if the trait is not directly publicGuillaume Gomez-1/+1
2023-03-15always make `define_opaque_types` explicitlcnr-3/+2
2023-02-16remove bound_type_of query; make type_of return EarlyBinder; change type_of ↵Kyle Matsuda-1/+1
in metadata
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
2022-12-12Round 2: make clean_middle_ty take a binderOli Scherer-2/+2
2022-12-12Round 1: add some binders (fails due to losing bound vars and then rebinding ↵Oli Scherer-1/+1
them with `Binder::dummy`)
2022-11-25get rid of to_poly_trait_predicateOli Scherer-6/+1
2022-11-16Convert predicates into Predicate in the Obligation constructorOli Scherer-0/+1
2022-10-30Make rustdoc Item::visibility computed on-demandGuillaume Gomez-1/+1
2022-10-29rustdoc: Split effective visibilities from rustc from similar data built by ↵Vadim Petrochenkov-1/+1
rustdoc for external def-ids
2022-10-26privacy: Rename "accessibility levels" to "effective visibilities"Vadim Petrochenkov-1/+1
And a couple of other naming tweaks Related to https://github.com/rust-lang/rust/issues/48054
2022-10-19rustdoc: Eliminate uses of `EarlyDocLinkResolver::all_traits`Vadim Petrochenkov-94/+102
2022-10-07Change InferCtxtBuilder from enter to buildCameron Steffen-58/+52
2022-09-19remove the `Subst` trait, always use `EarlyBinder`lcnr-1/+0
2022-08-29Replace `rustc_data_structures::thin_vec::ThinVec` with `thin_vec::ThinVec`.Nicholas Nethercote-1/+1
`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-10remove Clean trait implementation for ty::AssocItemGuillaume Gomez-1/+1
2022-08-02Remove Clean trait implementation for ty::TraitRefGuillaume Gomez-1/+1
2022-07-29Box TypedefItem, ImplItem, AssocTypeItem variants of ItemKindest31-2/+2
This reduces ItemKind size from 224 bytes to 160 bytes.
2022-07-23Remove Clean trait implementation for hir::Ty and middle::TyGuillaume Gomez-2/+2
2022-07-11Remove box syntax for Box<ImplItem> constructionest31-3/+3
ImplItem only has 80 bytes according to compiler internal rustdoc.
2022-05-21Remove `crate` visibility modifier in libs, testsJacob Pratt-3/+3