about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty/query.rs
AgeCommit message (Collapse)AuthorLines
2023-05-17Move rustc_middle/src/ty/query.rs to rustc_middle/src/query/plumbing.rsJohn Kåre Alsaker-640/+0
2023-05-15Move expansion of query macros in rustc_middle to rustc_middle::queryJohn Kåre Alsaker-76/+8
2023-04-30Use dynamic dispatch for queriesJohn Kåre Alsaker-24/+36
2023-04-26Add query accessor functionsJohn Kåre Alsaker-32/+55
2023-04-26Remove QueryEngine traitJohn Kåre Alsaker-20/+87
2023-04-24Split `{Idx, IndexVec, IndexSlice}` into their own modulesMaybe Waffle-1/+1
2023-04-21Allow `LocalDefId` as the argument to `def_path_str`Oli Scherer-1/+1
2023-04-20Feed type_of query instead of using WithOptconstParam.Camille GILLOT-6/+20
2023-04-08Remove `remap_env_constness` in queriesDeadbeef-14/+0
2023-04-06Don't rely on `Debug` impl for `Erased`John Kåre Alsaker-0/+1
2023-04-06Erase query cache valuesJohn Kåre Alsaker-12/+22
2023-03-21query_keys_local is conditional on separate_provide_if_externMichael Goulet-15/+14
2023-03-21AsLocalKey traitMichael Goulet-6/+3
2023-03-21Use local key in providersMichael Goulet-5/+26
2023-03-11Make the check for cache opt-in.Camille GILLOT-1/+39
2023-03-11Rollup merge of #108690 - Zoxc:query-size-limits, r=cjgillotMatthias Krüger-0/+30
Place size limits on query keys and values This just prevents these from growing accidentally too large. I'm not sure if there's an easy way to also print the actual size too.
2023-03-08Auto merge of #108312 - michaelwoerister:hash-set-not-hash-stable, r=eholkbors-2/+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-04Place size limits on query keys and valuesJohn Kåre Alsaker-0/+30
2023-03-01Use UnordSet instead of FxHashSet for names_imported_by_glob_use query.Michael Woerister-1/+1
2023-03-01Use LocalDefIdSet/Map instead of FxHashSet/Map for ↵Michael Woerister-1/+3
live_symbols_and_ignored_derived_traits query.
2023-03-01Use LocalDefIdSet instead of FxHashSet for reachable_set query.Michael Woerister-1/+1
2023-02-27Unify all validity check intrinsicsNilstrieb-1/+1
Also merges the inhabitedness check into the query to further unify the code paths.
2023-02-27Rollup merge of #108364 - Nilstrieb:validity-checks-refactor, r=compiler-errorsMatthias Krüger-0/+1
Unify validity checks into a single query Previously, there were two queries to check whether a type allows the 0x01 or zeroed bitpattern. I am planning on adding a further initness to check in #100423, truly uninit for MaybeUninit, which would make this three queries. This seems overkill for such a small feature, so this PR unifies them into one. I am not entirely happy with the naming and key type and open for improvements. r? oli-obk
2023-02-24Wrap missing provider message correctlyMichael Goulet-2/+3
2023-02-23Unify validity checks into a single queryNilstrieb-0/+1
Previously, there were two queries to check whether a type allows the 0x01 or zeroed bitpattern. I am planning on adding a further initness to check, truly uninit for MaybeUninit, which would make this three queries. This seems overkill for such a small feature, so this PR unifies them into one.
2023-02-17Auto merge of #107753 - kylematsuda:type-of, r=BoxyUwUbors-8/+0
Switch to `EarlyBinder` for `type_of` query Part of the work to finish #105779 and implement https://github.com/rust-lang/types-team/issues/78. Several queries `X` have a `bound_X` variant that wraps the output in `EarlyBinder`. This adds `EarlyBinder` to the return type of the `type_of` query and removes `bound_type_of`. r? `@lcnr`
2023-02-17Auto merge of #108145 - matthiaskrgr:rollup-bgadak1, r=matthiaskrgrbors-1/+1
Rollup of 8 pull requests Successful merges: - #104068 (rustdoc: Add PartialOrd trait to doc comment explanation) - #107489 (Implement partial support for non-lifetime binders) - #107905 (Pass arguments to `x` subcommands with `--`) - #108009 (Move some tests) - #108086 (wasm: Register the `relaxed-simd` target feature) - #108104 (don't into self) - #108133 (Small cleanups around `EarlyBinder`) - #108136 (Do not ICE on unmet trait alias impl bounds) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-02-16remove bound_type_of query; make type_of return EarlyBinder; change type_of ↵Kyle Matsuda-8/+0
in metadata
2023-02-16Add some comments and use inline(always) on query_provided_to_valueJohn Kåre Alsaker-1/+10
2023-02-16Move provider fields back to rustc_query_implJohn Kåre Alsaker-13/+1
2023-02-16Use dropless arena when possibleJohn Kåre Alsaker-1/+8
2023-02-16Factor query arena allocation out from query cachesJohn Kåre Alsaker-20/+76
2023-02-16Rename some region-specific stuffMichael Goulet-1/+1
2023-02-14Make permit_uninit/zero_init fallibleMichael Goulet-1/+0
2023-02-10Resolve documentation links in rustc and store the results in metadataVadim Petrochenkov-1/+1
This commit implements MCP https://github.com/rust-lang/compiler-team/issues/584 It also removes code that is no longer used, and that includes code cloning resolver, so issue #83761 is fixed.
2023-02-08Change `arena_cache` to not alter the declared query resultJohn Kåre Alsaker-16/+23
2023-02-04Remove `OnHit` callback from query caches.Camille GILLOT-40/+20
This is not useful now that query results are `Copy`.
2023-01-28Remove `HirId -> LocalDefId` map from HIR.Camille GILLOT-0/+8
2023-01-25Use `can_eq` to compare types for default assoc type errorNilstrieb-0/+8
This works correctly with inference variables.
2023-01-09Use newtype for unused generic parametersNilstrieb-2/+2
2022-12-05feed resolver_for_lowering instead of storing it in a fieldOli Scherer-1/+13
2022-12-05Allow arbitrary keys in feeding APIOli Scherer-5/+5
2022-12-01Don't allow feeding a query cache entry twiceOli Scherer-4/+2
2022-11-29Make TyCtxtFeed::def_id private.Camille GILLOT-1/+1
2022-11-29Feedable queries must allow hashing.Camille GILLOT-13/+1
2022-11-29Only allow feeding a value to newly created definitions.Camille GILLOT-17/+3
2022-11-29Allow to set a query's result as a side effect.Camille GILLOT-0/+68
2022-11-24Unsupported query error now specifies if its unsupported for local or ↵Sarthak Singh-2/+5
external crate
2022-11-01Use Key impl to select cache.Camille GILLOT-11/+10
2022-11-01Use VecCache for LocalDefId.Camille GILLOT-0/+8