about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/metadata.rs
AgeCommit message (Collapse)AuthorLines
2024-12-18Re-export more `rustc_span::symbol` things from `rustc_span`.Nicholas Nethercote-1/+1
`rustc_span::symbol` defines some things that are re-exported from `rustc_span`, such as `Symbol` and `sym`. But it doesn't re-export some closely related things such as `Ident` and `kw`. So you can do `use rustc_span::{Symbol, sym}` but you have to do `use rustc_span::symbol::{Ident, kw}`, which is inconsistent for no good reason. This commit re-exports `Ident`, `kw`, and `MacroRulesNormalizedIdent`, and changes many `rustc_span::symbol::` qualifiers in `compiler/` to `rustc_span::`. This is a 200+ net line of code reduction, mostly because many files with two `use rustc_span` items can be reduced to one.
2024-07-29Reformat `use` declarations.Nicholas Nethercote-2/+2
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-04-29Remove `extern crate rustc_macros` from `rustc_middle`.Nicholas Nethercote-1/+1
2023-04-18rustc_metadata: Remove `Span` from `ModChild`Vadim Petrochenkov-3/+0
It can be decoded on demand from regular `def_span` tables. Partially mitigates perf regressions from #109500.
2023-04-12resolve: Pre-compute non-reexport module childrenVadim Petrochenkov-2/+0
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-08resolve: Preserve reexport chains in `ModChild`renVadim Petrochenkov-1/+25
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
2022-09-07rustc: Parameterize `ty::Visibility` over used IDVadim Petrochenkov-1/+2
It allows using `LocalDefId` instead of `DefId` when possible, and also encode cheaper `Visibility<DefIndex>` into metadata.
2022-02-24resolve/metadata: Stop encoding macros as reexportsVadim Petrochenkov-0/+2
2022-01-09rustc_middle: Rename `Export` to `ModChild` and add some commentsVadim Petrochenkov-0/+24
Also rename `module_exports`/`export_map` to `module_reexports`/`reexport_map` for clarity.