about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty/query.rs
AgeCommit message (Collapse)AuthorLines
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
2022-11-01Remove CacheSelector.Camille GILLOT-9/+3
2022-10-29Auto merge of #102698 - michaelwoerister:unord-collections, r=lncrbors-0/+1
Introduce UnordMap, UnordSet, and UnordBag (MCP 533) This is the start of implementing [MCP 533](https://github.com/rust-lang/compiler-team/issues/533). I followed `@eddyb's` suggestion of naming the collection types `Unord(Map/Set/Bag)` which is a bit easier to type than `Unordered(Map/Set/Bag)` r? `@eddyb`
2022-10-27Introduce UnordMap, UnordSet, and UnordBag (see MCP 533)Michael Woerister-0/+1
MCP 533: https://github.com/rust-lang/compiler-team/issues/533 Also, as an example, substitute UnordMap for FxHashMap in used_trait_imports query result.
2022-10-26privacy: Rename "accessibility levels" to "effective visibilities"Vadim Petrochenkov-1/+1
And a couple of other naming tweaks Related to https://github.com/rust-lang/rust/issues/48054
2022-10-19Get rid of native_library projection queriesnils-1/+0
They don't seem particularly useful as I don't expect native libraries to change frequently.
2022-10-10Check representability in adt_sized_constraintCameron Steffen-1/+1
2022-10-01Compute by owner instead of HirId.Camille GILLOT-1/+1
2022-10-01Move lint level computation to rustc_middle::lint.Camille GILLOT-2/+2
2022-10-01Compute `lint_levels` by definitionDeadbeef-2/+3
2022-09-24separate definitions and `HIR` ownersTakayuki Maeda-1/+9
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-22Revert "Auto merge of #101620 - cjgillot:compute_lint_levels_by_def, r=oli-obk"Camille GILLOT-3/+1
This reverts commit 2cb9a65684dba47c52de8fa938febf97a73e70a9, reversing changes made to 750bd1a7ff3e010611b97ee75d30b7cbf5f3a03c.