summary refs log tree commit diff
path: root/compiler/rustc_middle/src/query
AgeCommit message (Collapse)AuthorLines
2021-06-07Revert "Merge CrateDisambiguator into StableCrateId"bjorn3-0/+4
This reverts commit d0ec85d3fb6d322496cb8f4bc1c21e19f23284ad.
2021-06-05Update compiler/rustc_middle/src/query/mod.rsCamille Gillot-1/+0
2021-06-04Always go through the expn_that_defined query.Camille GILLOT-0/+1
2021-06-02Restrict access to crate_name.Camille GILLOT-4/+0
Also remove original_crate_name, which had the exact same implementation
2021-06-02Auto merge of #85908 - cjgillot:private-dep-query, r=Aaron1011bors-0/+6
Make is_private_dep a query. Part of #85153 r? `@Aaron1011`
2021-06-01Make is_private_dep a query.Camille GILLOT-0/+6
2021-06-01Remove StableVec.Camille GILLOT-1/+1
2021-06-01Only compute the trait_map once.Camille GILLOT-1/+0
2021-06-01Revert "Reduce the amount of untracked state in TyCtxt"Camille Gillot-16/+16
2021-06-01Auto merge of #85153 - cjgillot:qresolve, r=Aaron1011bors-16/+16
Reduce the amount of untracked state in TyCtxt Access to untracked global state may generate instances of #84970. The GlobalCtxt contains the lowered HIR, the resolver outputs and interners. By wrapping the resolver inside a query, we make sure those accesses are properly tracked. As a no_hash query, all dependent queries essentially become `eval_always`, what they should have been from the beginning.
2021-05-31Auto merge of #85266 - cjgillot:hir-dep-clean, r=michaelwoeristerbors-1/+1
Remove obsolete workaround. The regression test for #62649 appears to pass even without the workaround.
2021-05-30Make is_private_dep a query.Camille GILLOT-0/+5
2021-05-30Make allocator_kind a query.Camille GILLOT-0/+3
2021-05-30Remove StableVec.Camille GILLOT-1/+1
2021-05-30Restrict access to crate_name.Camille GILLOT-4/+0
Also remove original_crate_name, which had the exact same implementation
2021-05-30Make resolutions a query.Camille GILLOT-10/+7
2021-05-30Only compute the trait_map once.Camille GILLOT-1/+0
2021-05-30Merge CrateDisambiguator into StableCrateIdbjorn3-4/+0
2021-05-28Merge fields and comment.Camille GILLOT-1/+1
2021-05-27Update compiler/rustc_middle/src/query/mod.rsNiko Matsakis-0/+1
Co-authored-by: Léo Lanteri Thauvin <leseulartichaut@gmail.com>
2021-05-26Don't hash `thir_body`LeSeulArtichaut-0/+1
2021-05-22Handle typeck errors properlyLeSeulArtichaut-1/+1
2021-05-22Make THIR building a stealable queryLeSeulArtichaut-0/+5
2021-05-17Auto merge of #85178 - cjgillot:local-crate, r=oli-obkbors-53/+38
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-15Auto merge of #85328 - GuillaumeGomez:rollup-exe9nbj, r=GuillaumeGomezbors-3/+2
Rollup of 12 pull requests Successful merges: - #84461 (rustdoc: Remove unnecessary `StripItem` wrapper) - #85067 (Minimize amount of fake `DefId`s used in rustdoc) - #85207 (Fix typo in comment) - #85215 (coverage bug fixes and some refactoring) - #85221 (dbg macro: Discuss use in tests, and slightly clarify) - #85246 (Miner code formatting) - #85253 (swap function order for better read flow) - #85256 (Fix display for "implementors" section) - #85268 (Use my real name) - #85278 (Improve match statements) - #85289 (Fix toggle position on mobile) - #85323 (Fix eslint errors) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-05-15Rollup merge of #85215 - richkadel:ice-fixes-minus-dead-blocks, r=tmandryGuillaume Gomez-3/+2
coverage bug fixes and some refactoring This replaces the relevant commits (2 and 3) from PR #85082, and also corrects an error querying for coverageinfo. 1. `coverageinfo` query needs to use the same MIR as codegen I ran into an error trying to fix dead block coverage and realized the `coverageinfo` query is getting a different MIR compared to the codegenned MIR, which can sometimes be a problem during mapgen. I changed that query to use the `InstandeDef` (which includes the generic parameter substitutions, prosibly specific to const params) instead of the `DefId` (without unknown/default const substitutions). 2. Simplified body_span and filtered span code Some code cleanup extracted from future (but unfinished) commit to fix coverage in attr macro functions. 3. Spanview needs the relevant body_span used for coverage The coverage body_span doesn't always match the function body_span. r? ```@tmandry```
2021-05-14add new attribute rustc_insignificant_dtor and a query to check if a type ↵Dhruv Jauhar-0/+15
has a significant drop
2021-05-13Auto merge of #83129 - LeSeulArtichaut:thir-unsafeck, r=nikomatsakisbors-0/+13
Introduce the beginning of a THIR unsafety checker This poses the foundations for the THIR unsafety checker, so that it can be implemented incrementally: - implements a rudimentary `Visitor` for the THIR (which will definitely need some tweaking in the future) - introduces a new `-Zthir-unsafeck` flag which tells the compiler to use THIR unsafeck instead of MIR unsafeck - implements detection of unsafe functions - adds revisions to the UI tests to test THIR unsafeck alongside MIR unsafeck This uses a very simple query design, where bodies are unsafety-checked on a body per body basis. This however has some big flaws: - the unsafety-checker builds the THIR itself, which means a lot of work is duplicated with MIR building constructing its own copy of the THIR - unsafety-checking closures is currently completely wrong: closures should take into account the "safety context" in which they are created, here we are considering that closures are always a safe context I had intended to fix these problems in follow-up PRs since they are always gated under the `-Zthir-unsafeck` flag (which is explicitely noted to be unsound). r? `@nikomatsakis` cc https://github.com/rust-lang/project-thir-unsafeck/issues/3 https://github.com/rust-lang/project-thir-unsafeck/issues/7
2021-05-12`coverageinfo` query needs to use the same MIR as codegenRich Kadel-3/+2
I ran into an error trying to fix dead block coverage and realized the `coverageinfo` query is getting a different MIR compared to the codegenned MIR, which can sometimes be a problem during mapgen. I changed that query to use the `InstandeDef` (which includes the generic parameter substitutions, prosibly specific to const params) instead of the `DefId` (without unknown/default const substitutions).
2021-05-12Use () for analysis.Camille GILLOT-4/+3
2021-05-12Use () for codegen queries.Camille GILLOT-10/+6
2021-05-12Use () for all_traits.Camille GILLOT-1/+1
2021-05-12Use () for visible_parent_map.Camille GILLOT-4/+2
2021-05-12Use () for lang items.Camille GILLOT-8/+6
2021-05-12Use () for privacy.Camille GILLOT-2/+2
2021-05-12Use () for typeck_item_bodies.Camille GILLOT-1/+1
2021-05-12Use () for inherent_impls.Camille GILLOT-6/+3
2021-05-12Use () for inferred_outlives_crate.Camille GILLOT-2/+1
2021-05-12Use () for crate_variances.Camille GILLOT-1/+1
2021-05-12Use () for mir_keys.Camille GILLOT-1/+1
2021-05-12Use () for lint_levels.Camille GILLOT-1/+1
2021-05-12Use () for proc_macro_decls_static.Camille GILLOT-1/+1
2021-05-12Use () for plugin_registrar_fn.Camille GILLOT-1/+1
2021-05-12Use () for entry_fn.Camille GILLOT-1/+1
2021-05-12Use () for HIR queries.Camille GILLOT-3/+3
2021-05-12Use () in reachable_set.Camille GILLOT-3/+3
2021-05-12Use () in dependency_formats.Camille GILLOT-3/+1
2021-05-11Introduce the (WIP) THIR unsafety checkerLeSeulArtichaut-0/+13
2021-05-11improve diagnosts for GATsb-naber-0/+4
2021-05-01Auto merge of #83114 - cjgillot:hop, r=eddybbors-1/+10
Move HIR parenting information out of hir_owner Split out of #82681. The parent of a HIR node and its content are currently bundled together, but are rarely used together. This PR separates both information in two distinct queries for HIR owners. This reduces incremental invalidation for HIR items that appear within a function body when this body (and the local ids) changes.