| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
|
|
* associated
* collected
* correspondence
* inlining
* into
* javascript
* multiline
* variadic
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
|
|
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``
|
|
|
|
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.
|
|
|
|
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
|
|
Keep ids of the documented items themselves, not their parent modules.
Parent modules can be retreived from those ids when necessary.
|
|
in metadata
|
|
|
|
|
|
EarlyBinder to fn_sig in metadata
|
|
|
|
Not all uses are converted, a few cases iterating through maps/sets and requiring nontrivial changes are kept.
|
|
Filter away names that are not actually imported by the glob, e.g. because they are shadowed by something else
|
|
bound_impl_trait_ref query; add EarlyBinder to impl_trait_ref in metadata
|
|
|
|
|
|
`SimplifiedType` cleanups
r? `@lcnr`
|
|
`SimplifiedTypeGen<DefId>` is the only instantiation used, so we don't
need the generic parameter.
|
|
|
|
them with `Binder::dummy`)
|
|
|
|
rustdoc: use `ThinVec` and `Box<str>` to shrink `clean::ItemKind`
|
|
|
|
|
|
cross-crate functions and methods
|
|
|
|
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`
|
|
r=GuillaumeGomez
rustdoc: add support for incoherent impls on structs and traits
Fixes #103170
|
|
|
|
Fixes #103170
|
|
rustdoc for external def-ids
|
|
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.
|
|
And a couple of other naming tweaks
Related to https://github.com/rust-lang/rust/issues/48054
|
|
|
|
|
|
Instead, it gathers the extra info later, when it's actually requested.
|
|
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`
|
|
`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.
|
|
|
|
|
|
This reduces the memory consumption of ItemKind.
|
|
This reduces the size of Type.
|
|
|
|
Remove more Clean trait implementations
Follow-up of https://github.com/rust-lang/rust/pull/99638.
r? ``@Dylan-DPC``
|