summary refs log tree commit diff
path: root/compiler/rustc_middle/src/query
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-21Replace `QueryStruct` with arrays local to `rustc_query_impl`John KÃ¥re Alsaker-13/+3
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-18Auto merge of #111345 - jyn514:cfg-release-caching, r=cjgillot,est31bors-1/+1
Only depend on CFG_VERSION in rustc_interface This avoids having to rebuild the whole compiler on each commit when `omit-git-hash = false`. cc https://github.com/rust-lang/rust/issues/76720 - this won't fix it, and I'm not suggesting we turn this on by default, but it will make it less painful for people who do have `omit-git-hash` on as a workaround.
2023-05-18Rollup merge of #111703 - Zoxc:queries-mod, r=cjgillotDylan DPC-93/+64
Merge query property modules into one This merges all the query modules that defines types into a single module per query with a normal naming convention for type aliases. r? ``@cjgillot``
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-18Merge query property modules into oneJohn KÃ¥re Alsaker-93/+64
2023-05-17Only depend on CFG_VERSION in rustc_interfacejyn-1/+1
this avoids having to rebuild the whole compiler on each commit when `omit-git-hash = false`.
2023-05-17Delay a bug when overwriting fed value.Camille GILLOT-5/+13
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-17Move rustc_middle/src/ty/query.rs to rustc_middle/src/query/plumbing.rsJohn KÃ¥re Alsaker-0/+640
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-12Use the opaque_types_defined_by query to cheaply check for whether a hidden ↵Oli Scherer-0/+4
type may be registered for an opaque type
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-4/+5
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-07Auto merge of #111161 - compiler-errors:rtn-super, r=cjgillotbors-1/+1
Support return-type bounds on associated methods from supertraits Support `T: Trait<method(): Bound>` when `method` comes from a supertrait, aligning it with the behavior of associated type bounds (both equality and trait bounds). The only wrinkle is that I have to extend `super_predicates_that_define_assoc_type` to look for *all* items, not just `AssocKind::Ty`. This will also be needed to support `feature(associated_const_equality)` as well, which is subtly broken when it comes to supertraits, though this PR does not fix those yet. There's a slight chance there's a perf regression here, in which case I guess I could split it out into a separate query.
2023-05-04IAT: Introduce AliasKind::InherentLeón Orell Valerian Liehr-0/+10
2023-05-04Remove unneeded encode/decode methods.Nicholas Nethercote-4/+0
In #110927 the encode/decode methods for `i8`, `char`, `bool`, and `str` were made inherent. This commit removes some unnecessary implementations of these methods that were missed in that PR.
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-26Inline tweaksJohn KÃ¥re Alsaker-4/+24
2023-04-26Remove QueryEngine traitJohn KÃ¥re Alsaker-47/+10
2023-04-26Move on_disk_cache.rsJohn KÃ¥re Alsaker-0/+1064
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-107/+18
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()`.