summary refs log tree commit diff
path: root/compiler/rustc_middle/src/query/mod.rs
AgeCommit message (Collapse)AuthorLines
2023-05-24Rollup merge of #111870 - WaffleLapkin:just_🌟traits🌟_query, ↵Matthias Krüger-9/+11
r=compiler-errors Rename `traits_in_crate` query to `traits` > NOTE: Not named just `traits` due to a naming conflict. This can, in fact, be easily avoided.
2023-05-23Rename `traits_in_crate` query to `traits`Maybe Waffle-9/+11
2023-05-19Auto merge of #111641 - michaelwoerister:debugger-visualizer-fixes, r=cjgillotbors-1/+8
Fix dependency tracking for debugger visualizers This PR fixes dependency tracking for debugger visualizer files by changing the `debugger_visualizers` query to an `eval_always` query that scans the AST while it is still available. This way the set of visualizer files is already available when dep-info is emitted. Since the query is turned into an `eval_always` query, dependency tracking will now reliably detect changes to the visualizer script files themselves. TODO: - [x] perf.rlo - [x] Needs a bit more documentation in some places - [x] Needs regression test for the incr. comp. case Fixes https://github.com/rust-lang/rust/issues/111226 Fixes https://github.com/rust-lang/rust/issues/111227 Fixes https://github.com/rust-lang/rust/issues/111295 r? `@wesleywiser` cc `@gibbyfree`
2023-05-18Rollup merge of #111686 - cjgillot:no-foreign-item, r=compiler-errorsDylan DPC-6/+0
Retire is_foreign_item query. This can be written in terms of `DefKind`. This does not deserve the cost of a query.
2023-05-17Retire is_foreign_item query.Camille GILLOT-6/+0
2023-05-17Finish move of query.rsJohn KÃ¥re Alsaker-5/+5
2023-05-16Move DebuggerVisualizerFile types from rustc_span to rustc_middleMichael Woerister-1/+2
2023-05-16Rollup merge of #111533 - clubby789:drop-tracking-error, r=oli-obkMatthias Krüger-1/+1
Handle error body in generator layout Fixes #111468 I feel like making this query return `Option<GeneratorLayout>` might be better but had some issues with that approach
2023-05-16Turn debugger_visualizers from feed- into regular query.Michael Woerister-1/+6
2023-05-16Fix dependency tracking for debugger visualizersMichael Woerister-0/+1
2023-05-15Move expansion of query macros in rustc_middle to rustc_middle::queryJohn KÃ¥re Alsaker-1/+85
2023-05-13Handle error body when in generator layoutclubby789-1/+1
2023-05-12add `query opaque_types_defined_by`lcnr-0/+9
2023-05-11Rollup merge of #108705 - clubby789:refutable-let-closure-borrow, r=cjgillotMatthias Krüger-1/+1
Prevent ICE with broken borrow in closure r? `@Nilstrieb` Fixes #108683 This solution isn't ideal, I'm hoping to find a way to continue compilation without ICEing.
2023-05-09add EarlyBinder to thir_abstract_const; remove tcx.bound_abstract_constKyle Matsuda-1/+1
2023-05-08Rollup merge of #109410 - fmease:iat-alias-kind-inherent, r=compiler-errorsMichael Goulet-0/+10
Introduce `AliasKind::Inherent` for inherent associated types Allows us to check (possibly generic) inherent associated types for well-formedness. Type inference now also works properly. Follow-up to #105961. Supersedes #108430. Fixes #106722. Fixes #108957. Fixes #109768. Fixes #109789. Fixes #109790. ~Not to be merged before #108860 (`AliasKind::Weak`).~ CC `@jackh726` r? `@compiler-errors` `@rustbot` label T-types F-inherent_associated_types
2023-05-04IAT: Introduce AliasKind::InherentLeón Orell Valerian Liehr-0/+10
2023-05-03Rename things to reflect that they're not item specificMichael Goulet-1/+1
2023-05-02Auto merge of #111028 - compiler-errors:attr-query-no-caching, r=cjgillotbors-10/+0
Make some simple queries no longer cache on disk I don't think we need to cache queries with really simple local providers, like loading hir and accessing an attr r? `@ghost`
2023-05-01Make some simple queries no longer cache on diskMichael Goulet-10/+0
2023-04-30Only cache typeck results if it's the typeck rootMichael Goulet-1/+1
2023-04-30Bail out of MIR construction if `check_match` failsclubby789-1/+1
2023-04-26Remove QueryEngine traitJohn KÃ¥re Alsaker-0/+1
2023-04-25Rollup merge of #110556 - kylematsuda:earlybinder-explicit-item-bounds, ↵Matthias Krüger-1/+1
r=compiler-errors Switch to `EarlyBinder` for `explicit_item_bounds` Part of the work to finish https://github.com/rust-lang/rust/issues/105779. This PR adds `EarlyBinder` to the return type of the `explicit_item_bounds` query and removes `bound_explicit_item_bounds`. r? `@compiler-errors` (hope it's okay to request you, since you reviewed #110299 and #110498 :smiley:)
2023-04-25Revert "Remove #[alloc_error_handler] from the compiler and library"Matthias Krüger-0/+11
This reverts commit abc0660118cc95f47445fd33502a11dd448f5968.
2023-04-23Auto merge of #108118 - oli-obk:lazy_typeck, r=cjgillotbors-39/+35
Run various queries from other queries instead of explicitly in phases These are just legacy leftovers from when rustc didn't have a query system. While there are more cleanups of this sort that can be done here, I want to land them in smaller steps. This phased order of query invocations was already a lie, as any query that looks at types (e.g. the wf checks run before) can invoke e.g. const eval which invokes borrowck, which invokes typeck, ...
2023-04-22Auto merge of #109507 - Amanieu:panic-oom-payload, r=davidtwcobors-11/+0
Report allocation errors as panics OOM is now reported as a panic but with a custom payload type (`AllocErrorPanicPayload`) which holds the layout that was passed to `handle_alloc_error`. This should be review one commit at a time: - The first commit adds `AllocErrorPanicPayload` and changes allocation errors to always be reported as panics. - The second commit removes `#[alloc_error_handler]` and the `alloc_error_hook` API. ACP: https://github.com/rust-lang/libs-team/issues/192 Closes #51540 Closes #51245
2023-04-21Make `check_match` and `check_liveness` take a `LocalDefId`Oli Scherer-2/+2
2023-04-21Allow `LocalDefId` as the argument to `def_path_str`Oli Scherer-33/+33
2023-04-21Leave it to the query system to invoke the typeck query instead of invoking ↵Oli Scherer-4/+0
it eagerly. Later queries that are run on all body owners will invoke typeck as they need information from its result to perform their own logic
2023-04-21rustc_metadata: Split `children` into multiple tablesVadim Petrochenkov-2/+3
instead of merging everything into a single bag. If it's acceptable from performance point of view, then it's more clear to keep this stuff organized more in accordance with its use.
2023-04-20add EarlyBinder to output of explicit_item_bounds; replace ↵Kyle Matsuda-1/+1
bound_explicit_item_bounds usages; remove bound_explicit_item_bounds query
2023-04-20Give more descriptive names to queries.Camille GILLOT-1/+1
2023-04-20Remove opt_const_param_of.Camille GILLOT-23/+0
2023-04-20Remove WithOptconstParam.Camille GILLOT-98/+17
2023-04-18add EarlyBinder to return type of ↵Kyle Matsuda-1/+1
collect_return_position_impl_trait_in_trait_tys query; remove bound_X version
2023-04-16Remove #[alloc_error_handler] from the compiler and libraryAmanieu d'Antras-11/+0
2023-04-16Rollup merge of #109665 - fee1-dead-contrib:rm-remap-queries, r=oli-obkfee1-dead-25/+0
Remove `remap_env_constness` in queries This removes some of the complexities with const traits. #88119 used to be caused by this but was fixed by `param_env = param_env.without_const()`.
2023-04-14Auto merge of #110160 - petrochenkov:notagain2, r=cjgillotbors-4/+0
resolve: Pre-compute non-reexport module children 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-12Rollup merge of #110153 - DaniPopes:compiler-typos, r=NilstriebMatthias Krüger-1/+1
Fix typos in compiler I ran [`typos -w compiler`](https://github.com/crate-ci/typos) to fix typos in the `compiler` directory. Refs #110150
2023-04-12resolve: Pre-compute non-reexport module childrenVadim Petrochenkov-4/+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-11Split implied and super predicate queriesMichael Goulet-0/+6
2023-04-11Split super_predicates_that_define_assoc_type query from super_predicates_ofMichael Goulet-3/+3
2023-04-10Fix typos in compilerDaniPopes-1/+1
2023-04-08rustc_middle: Remove `Option` from `module_reexports` queryVadim Petrochenkov-1/+1
2023-04-08Remove `remap_env_constness` in queriesDeadbeef-25/+0
2023-04-06Auto merge of #109333 - Zoxc:erase-query-cache-values, r=cjgillotbors-0/+1
Erase query cache values This replaces most concrete query values `V` with `MaybeUninit<[u8; { size_of::<V>() }]>` without introducing dynamic dispatch like https://github.com/rust-lang/rust/pull/108638 does. This is split out of https://github.com/rust-lang/rust/pull/108638 so the performance impact of only this change can be measured. r? `@cjgillot`
2023-04-06Erase query cache valuesJohn KÃ¥re Alsaker-0/+1
2023-04-03Make check_match take a LocalDefId.Camille GILLOT-3/+3
2023-03-23rustc_interface: Add a new query `pre_configure`Vadim Petrochenkov-1/+1
It partially expands crate attributes before the main expansion pass (without modifying the crate), and the produced preliminary crate attribute list is used for querying a few attributes that are required very early. Crate-level cfg attributes are then expanded normally during the main expansion pass, like attributes on any other nodes.