about summary refs log tree commit diff
path: root/compiler/rustc_passes/src/reachable.rs
AgeCommit message (Collapse)AuthorLines
2023-03-08Auto merge of #108312 - michaelwoerister:hash-set-not-hash-stable, r=eholkbors-4/+4
Do not implement HashStable for HashSet (MCP 533) This PR removes all occurrences of `HashSet` in query results, replacing it either with `FxIndexSet` or with `UnordSet`, and then removes the `HashStable` implementation of `HashSet`. This is part of implementing [MCP 533](https://github.com/rust-lang/compiler-team/issues/533), that is, removing the `HashStable` implementations of all collection types with unstable iteration order. The changes are mostly mechanical. The only place where additional sorting is happening is in Miri's override implementation of the `exported_symbols` query.
2023-03-02rustc_middle: Remove trait `DefIdTree`Vadim Petrochenkov-1/+1
This trait was a way to generalize over both `TyCtxt` and `Resolver`, but now `Resolver` has access to `TyCtxt`, so this trait is no longer necessary.
2023-03-01Use LocalDefIdSet instead of FxHashSet for reachable_set query.Michael Woerister-4/+4
2023-02-14Do not fetch HIR for reachable.Camille GILLOT-16/+13
2023-02-14Add `of_trait` to DefKind::Impl.Camille GILLOT-1/+1
2022-12-20rustc: Remove needless lifetimesJeremy Stucki-2/+2
2022-11-28Statics used in reachable function's inline asm are reachableTomasz Miąsko-0/+11
2022-10-29Improve LanguageItems apiCameron Steffen-5/+3
2022-10-29Rename some `OwnerId` fields.Nicholas Nethercote-10/+10
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-10-09ImplItemKind::TyAlias => ImplItemKind::TypeMichael Goulet-2/+2
2022-09-24separate definitions and `HIR` ownersTakayuki Maeda-7/+7
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-14change AccessLevels representationBryanskiy-2/+8
2022-07-12Add an indirection for closures in `hir::ExprKind`Maybe Waffle-1/+4
This helps bring `hir::Expr` size down, `Closure` was the biggest variant, especially after `for<>` additions.
2022-06-18Remove a possible unnecessary assignmentYuki Okushi-2/+0
The reference issue has been closed (the feature has been stabilized) and things work fine without fine, it seems. Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-06-12Make `ExprKind::Closure` a struct variant.Camille GILLOT-1/+1
2022-06-03Encode MIR for 'unreachable' non-generic fnsMichael Goulet-25/+8
2022-05-13check def_kind before fetching itemMiguel Guarniz-21/+27
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-13remove CollectPrivateImplItemsVisitorMiguel Guarniz-70/+57
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
2022-05-09reviewlcnr-2/+2
2022-05-09only compute `codegen_fn_attrs` where neededlcnr-11/+17
2022-05-02rustc: Panic by default in `DefIdTree::parent`Vadim Petrochenkov-2/+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-18Make `#[used]` considered reachableGary Guo-0/+5
2022-02-285 - Make more use of let_chainsCaio-17/+15
2022-02-19Adopt let else in more placesest31-3/+2
2022-01-16Replace NestedVisitorMap with NestedFilterCameron Steffen-7/+1
2022-01-15Reduce use of local_def_id_to_hir_id.Camille GILLOT-10/+6
2022-01-15Return a LocalDefId in get_parent_item.Camille GILLOT-1/+1
2021-12-15Remove `in_band_lifetimes` for `rustc_passes`Peter Jaszkowiak-1/+1
2021-11-28Take a LocalDefId in expect_*item.Camille GILLOT-2/+1
2021-09-29Avoid more invocations of hir_crate query.Camille GILLOT-1/+1
2021-08-28Remove obsolete `MacroDef` variant of `OwnerNode`inquisitivecrystal-2/+1
2021-08-28Treat macros as HIR itemsinquisitivecrystal-0/+1
2021-08-15Fix `reachable_set` for non-function items in non-library crateshyd-dev-15/+16
2021-08-12Add associated functions that have custom linkage to `reachable_set`hyd-dev-13/+21
2021-07-31rustc: Replace `HirId`s with `LocalDefId`s in `AccessLevels` tablesVadim Petrochenkov-4/+2
and passes using them - primarily privacy checking, stability checking and dead code checking. WIP
2021-05-17Auto merge of #85178 - cjgillot:local-crate, r=oli-obkbors-6/+3
Remove CrateNum parameter for queries that only work on local crate The pervasive `CrateNum` parameter is a remnant of the multi-crate rustc idea. Using `()` as query key in those cases avoids having to worry about the validity of the query key.
2021-05-12Use () for privacy.Camille GILLOT-2/+1
2021-05-12Use () in reachable_set.Camille GILLOT-4/+2
2021-04-25Reachable statics have reachable initializersTomasz Miąsko-2/+1
Static initializer can read other statics. Initializers are evaluated at compile time, and so their content could become inlined into another crate. Ensure that initializers of reachable statics are also reachable. Previously, when an item incorrectly considered to be unreachable was reached from another crate an attempt would be made to codegen it. The attempt could fail with an ICE (in the case MIR wasn't available to do so) in some circumstances the attempt could also succeed resulting in a local codegen of non-local items, including static ones.
2021-02-15Only store a LocalDefId in hir::ImplItem.Camille GILLOT-4/+3
2021-02-15Only store a LocalDefId in hir::Item.Camille GILLOT-10/+10
Items are guaranteed to be HIR owner.
2021-01-23Allow to query the HIR crate node.Camille GILLOT-0/+1
2021-01-12Separate out a `hir::Impl` structJoshua Nelson-1/+3
This makes it possible to pass the `Impl` directly to functions, instead of having to pass each of the many fields one at a time. It also simplifies matches in many cases.
2020-11-26Formatting.Camille GILLOT-1/+3
2020-11-26Remove ForeignMod struct.Camille GILLOT-1/+1
2020-11-26Store ForeignItem in a side table.Camille GILLOT-0/+2
2020-08-30mv compiler to compiler/mark-0/+435