about summary refs log tree commit diff
path: root/compiler/rustc_save_analysis/src/lib.rs
AgeCommit message (Collapse)AuthorLines
2023-02-16Remove save-analysis.Nicholas Nethercote-1067/+0
Most tests involving save-analysis were removed, but I kept a few where the `-Zsave-analysis` was an add-on to the main thing being tested, rather than the main thing being tested. For `x.py install`, the `rust-analysis` target has been removed. For `x.py dist`, the `rust-analysis` target has been kept in a degenerate form: it just produces a single file `reduced.json` indicating that save-analysis has been removed. This is necessary for rustup to keep working. Closes #43606.
2023-02-14Add `of_trait` to DefKind::Impl.Camille GILLOT-1/+1
2023-01-28Remove `HirId -> LocalDefId` map from HIR.Camille GILLOT-34/+29
2023-01-04rename get_parent_node to parent_idMichael Goulet-1/+1
2022-12-20rustc: Remove needless lifetimesJeremy Stucki-3/+3
2022-12-10compiler: remove unnecessary imports and qualified pathsKaDiWa-1/+0
2022-12-07Use `Symbol` for the crate name instead of `String`/`str`Oli Scherer-4/+4
2022-12-01rustc_hir: Change representation of import paths to support multiple resolutionsVadim Petrochenkov-1/+3
2022-11-27Prefer doc comments over `//`-comments in compilerMaybe Waffle-2/+2
2022-11-13Store a LocalDefId in hir::Variant & hir::Field.Camille GILLOT-1/+1
2022-10-29Rename some `OwnerId` fields.Nicholas Nethercote-4/+4
spastorino noticed some silly expressions like `item_id.def_id.def_id`. This commit renames several `def_id: OwnerId` fields as `owner_id`, so those expressions become `item_id.owner_id.def_id`. `item_id.owner_id.local_def_id` would be even clearer, but the use of `def_id` for values of type `LocalDefId` is *very* widespread, so I left that alone.
2022-10-26privacy: Rename "accessibility levels" to "effective visibilities"Vadim Petrochenkov-7/+7
And a couple of other naming tweaks Related to https://github.com/rust-lang/rust/issues/48054
2022-09-29Shrink `hir::def::Res`.Nicholas Nethercote-2/+3
`Res::SelfTy` currently has two `Option`s. When the second one is `Some` the first one is never consulted. So we can split it into two variants, `Res::SelfTyParam` and `Res::SelfTyAlias`, reducing the size of `Res` from 24 bytes to 12. This then shrinks `hir::Path` and `hir::PathSegment`, which are the HIR types that take up the most space.
2022-09-26remove cfg(bootstrap)Pietro Albini-1/+0
2022-09-24separate definitions and `HIR` ownersTakayuki Maeda-2/+2
fix a ui test use `into` fix clippy ui test fix a run-make-fulldeps test implement `IntoQueryParam<DefId>` for `OwnerId` use `OwnerId` for more queries change the type of `ParentOwnerIterator::Item` to `(OwnerId, OwnerNode)`
2022-09-15Only enable the let_else feature on bootstrapest31-1/+1
On later stages, the feature is already stable. Result of running: rg -l "feature.let_else" compiler/ src/librustdoc/ library/ | xargs sed -s -i "s#\\[feature.let_else#\\[cfg_attr\\(bootstrap, feature\\(let_else\\)#"
2022-09-09RPITIT placeholder itemsMichael Goulet-0/+1
2022-09-06Auto merge of #101241 - camsteffen:refactor-binding-annotations, r=cjgillotbors-13/+2
`BindingAnnotation` refactor * `ast::BindingMode` is deleted and replaced with `hir::BindingAnnotation` (which is moved to `ast`) * `BindingAnnotation` is changed from an enum to a tuple struct e.g. `BindingAnnotation(ByRef::No, Mutability::Mut)` * Associated constants added for convenience `BindingAnnotation::{NONE, REF, MUT, REF_MUT}` One goal is to make it more clear that `BindingAnnotation` merely represents syntax `ref mut` and not the actual binding mode. This was especially confusing since we had `ast::BindingMode`->`hir::BindingAnnotation`->`thir::BindingMode`. I wish there were more symmetry between `ByRef` and `Mutability` (variant) naming (maybe `Mutable::Yes`?), and I also don't love how long the name `BindingAnnotation` is, but this seems like the best compromise. Ideas welcome.
2022-09-05Make `hir::PathSegment::hir_id` non-optional.Nicholas Nethercote-1/+1
2022-09-05Make `hir::PathSegment::res` non-optional.Nicholas Nethercote-4/+5
2022-09-02Refactor and re-use BindingAnnotationCameron Steffen-13/+2
2022-09-01Always import all tracing macros for the entire crate instead of piecemeal ↵Oli Scherer-2/+3
by module
2022-08-24save_analysis: Migrate diagnosticsWonchul Lee-1/+5
2022-08-01Remove DefId from AssocItemContainer.Camille GILLOT-2/+2
2022-08-01Store associated item defaultness in impl_defaultness.Camille GILLOT-1/+1
2022-07-01Factor out hir::Node::BindingCameron Steffen-3/+3
2022-06-03Fully stabilize NLLJack Huey-1/+0
2022-05-02rustc: Panic by default in `DefIdTree::parent`Vadim Petrochenkov-1/+1
Only crate root def-ids don't have a parent, and in majority of cases the argument of `DefIdTree::parent` cannot be a crate root. So we now panic by default in `parent` and introduce a new non-panicing function `opt_parent` for cases where the argument can be a crate root. Same applies to `local_parent`/`opt_local_parent`.
2022-04-23Stop pretty-printing HIR visibility.Camille GILLOT-3/+1
2022-04-23Stop visiting visibility.Camille GILLOT-6/+0
2022-03-31remove find_use_placementFausto-1/+1
A more robust solution to finding where to place use suggestions was added. The algorithm uses the AST to find the span for the suggestion so we pass this span down to the HIR during lowering and use it. Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-03-29Remember mutability in `DefKind::Static`.Camille GILLOT-1/+1
This allows to compute the `BodyOwnerKind` from `DefKind` only, and removes a direct dependency of some MIR queries onto HIR. As a side effect, it also simplifies metadata, since we don't need 4 flavours of `EntryKind::*Static` any more.
2022-03-11Improve `AdtDef` interning.Nicholas Nethercote-1/+1
This commit makes `AdtDef` use `Interned`. Much the commit is tedious changes to introduce getter functions. The interesting changes are in `compiler/rustc_middle/src/ty/adt.rs`.
2022-02-25Switch bootstrap cfgsMark Rousskov-1/+1
2022-02-20Auto merge of #94062 - Mark-Simulacrum:drop-print-cfg, r=oli-obkbors-1/+1
Move ty::print methods to Drop-based scope guards Primary goal is reducing codegen of the TLS access for each closure, which shaves ~3 seconds of bootstrap time over rustc as a whole.
2022-02-19Adopt let else in more placesest31-12/+6
2022-02-16Move ty::print methods to Drop-based scope guardsMark Rousskov-1/+1
2022-02-12change to a struct variantEllen-2/+2
2022-02-02More let_else adoptionsest31-0/+1
2022-02-01add a rustc::query_stability lintlcnr-0/+1
2022-01-31Rollup merge of #90277 - pierwill:fix-70258-inference-terms, r=jackh726Matthias Krüger-1/+1
Improve terminology around "after typeck" Closes #70258.
2022-01-19Correctly handle starts in block doc commentsGuillaume Gomez-2/+2
2022-01-16Replace NestedVisitorMap with NestedFilterCameron Steffen-4/+4
2022-01-07Add `trait_item_def_id` to `AssocItem`Matthew Jasper-7/+5
This allows avoiding some lookups by name
2021-12-19Auto merge of #91957 - nnethercote:rm-SymbolStr, r=oli-obkbors-1/+1
Remove `SymbolStr` This was originally proposed in https://github.com/rust-lang/rust/pull/74554#discussion_r466203544. As well as removing the icky `SymbolStr` type, it allows the removal of a lot of `&` and `*` occurrences. Best reviewed one commit at a time. r? `@oli-obk`
2021-12-15Remove unnecessary sigils around `Symbol::as_str()` calls.Nicholas Nethercote-1/+1
2021-12-14fix clippy::single_char_pattern perf findingsMatthias Krüger-1/+1
2021-11-07Give inline const separate DefKindGary Guo-0/+1
2021-11-06Improve terminology around "after typeck"pierwill-1/+1
2021-10-28Revert "Add rustc lint, warning when iterating over hashmaps"Mark Rousskov-1/+0