summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty/query.rs
AgeCommit message (Collapse)AuthorLines
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.
2022-09-20Rollup merge of #101958 - hanar3:101666/enhance-error-message, r=oli-obkMichael Howell-2/+3
Improve error for when query is unsupported by crate This is an improvement to the error message mentioned on #101666. It seems like a good idea to also add [this link to the rustc-dev-guide](https://rustc-dev-guide.rust-lang.org/query.html), if explaining the query system in detail is a concern here, but I'm unsure if there is any restrictions on adding links to error messages.
2022-09-17improve error message for when a query isn't supportedhanar3-3/+3
2022-09-14Move some code and add comments.Camille GILLOT-2/+2
2022-09-14Compute `lint_levels` by definitionDeadbeef-1/+3
2022-09-14Improve error message for unsupported cratehanar3-2/+3
2022-09-09Make the `storage` query modifier less generalJoshua Nelson-2/+2
In practice, it was only ever used with `ArenaCacheSelector`. Change it to a single boolean `arena_cache` rather than allowing queries to specify an arbitrary type.
2022-08-24Simplify the syntax for macros generated by `rustc_queries`Joshua Nelson-1/+1
- Disallow multiple macros callbacks in the same invocation. In practice, this was never used. - Remove the `[]` brackets around the macro name - Require an `ident`, not an arbitrary `tt`
2022-08-23Remove `$tcx` metavariable from `rustc_query_append`Joshua Nelson-16/+16
It's not actually necessary and it makes the code harder to read.
2022-07-14Use constant eval to do strict validity checks5225225-0/+1
2022-06-06Rollup merge of #97312 - cjgillot:no-path-in-scope, r=compiler-errorsDylan DPC-3/+1
Compute lifetimes in scope at diagnostic time The set of available lifetimes is currently computed during lifetime resolution on HIR. It is only used for one diagnostic. In this PR, HIR lifetime resolution just reports whether elided lifetimes are well-defined at the place of use. The diagnostic code is responsible for building a list of lifetime names if elision is not allowed. This will allow to remove lifetime resolution on HIR eventually.
2022-06-04Iterate over `maybe_unused_trait_imports` when checking dead trait importsElliot Roberts-1/+1
2022-06-04Completely remove LifetimeScopeForPath.Camille GILLOT-3/+1
2022-05-22factor out the rvalue lifetime ruleDing Xiang Fei-1/+0
remove region_scope_tree from RegionCtxt Apply suggestions from code review Co-authored-by: Niko Matsakis <niko@alum.mit.edu>
2022-05-16use GlobalId in eval_to_valtree query and introduce query for ↵b-naber-2/+4
valtree_to_const_val
2022-04-25Auto merge of #95604 - nbdd0121:used2, r=petrochenkovbors-1/+1
Generate synthetic object file to ensure all exported and used symbols participate in the linking Fix #50007 and #47384 This is the synthetic object file approach that I described in https://github.com/rust-lang/rust/pull/95363#issuecomment-1079932354, allowing all exported and used symbols to be linked while still allowing them to be GCed. Related #93791, #95363 r? `@petrochenkov` cc `@carbotaniuman`
2022-04-18Add `SymbolExportInfo`Gary Guo-1/+1
This is currently a wrapper to `SymbolExportLevel` but it allows later addition of extra information.
2022-04-16Provide a better diagnostic on failure to meet send bound on futures in a ↵oribenshir-5/+5
foreign crate Adding diagnostic data on generators to the crate metadata and using it to provide a better diagnostic on failure to meet send bound on futures originated from a foreign crate
2022-03-24Swap DtorckConstraint to DropckConstraintInfRandomness-1/+1
This change was made as per suspicion that this struct was never renamed after consistent use of DropCk. This also clarifies the meaning behind the name of this structure.
2022-03-16resolve the conflict in compiler/rustc_session/src/parse.rscodehorseman-1/+1
Signed-off-by: codehorseman <cricis@yeah.net>
2022-03-02rename ErrorReported -> ErrorGuaranteedmark-1/+1
2022-02-20Delete QueryLookupMark Rousskov-9/+8
This was largely just caching the shard value at this point, which is not particularly useful -- in the use sites the key was being hashed nearby anyway.
2022-02-20Move Sharded maps into each QueryCache implMark Rousskov-1/+1
2022-02-09Ensure that queries only return Copy types.Camille GILLOT-1/+14
2022-01-25Return an indexmap in `all_local_trait_impls` querypierwill-1/+0
The data structure previously used here required Ord. As part of #90317, we do not want DefId to implement Ord.
2022-01-09rustc_middle: Rename `Export` to `ModChild` and add some commentsVadim Petrochenkov-1/+1
Also rename `module_exports`/`export_map` to `module_reexports`/`reexport_map` for clarity.
2022-01-06rustc_middle: Add a method for getting a `SimplifiedType` definition/IDVadim Petrochenkov-0/+1
Import `SimplifiedType` more
2021-12-15Remove `in_band_lifetimes` from `rustc_middle`Aaron Hill-7/+7
See #91867 This was mostly straightforward. In several places, I take advantage of the fact that lifetimes are non-hygenic: a macro declares the 'tcx' lifetime, which is then used in types passed in as macro arguments.
2021-12-12Query modifierDeadbeef-0/+14
2021-10-25Avoid a branch on key being local for queries that use the same local and ↵bjorn3-0/+50
extern providers