diff options
| author | lcnr <rust@lcnr.de> | 2022-03-15 16:30:30 +0100 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2022-03-30 11:23:58 +0200 |
| commit | bef6f3e895beede5bfd5ba4bb12898615c156d59 (patch) | |
| tree | 724e0593725707bbff014409e6b495142830315b /compiler/rustc_middle/src/query | |
| parent | 4558a125b6108f3c080e88d7746e1d422b969bef (diff) | |
| download | rust-bef6f3e895beede5bfd5ba4bb12898615c156d59.tar.gz rust-bef6f3e895beede5bfd5ba4bb12898615c156d59.zip | |
rework implementation for inherent impls for builtin types
Diffstat (limited to 'compiler/rustc_middle/src/query')
| -rw-r--r-- | compiler/rustc_middle/src/query/mod.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs index 95260e9e917..6d7e7ef0cb0 100644 --- a/compiler/rustc_middle/src/query/mod.rs +++ b/compiler/rustc_middle/src/query/mod.rs @@ -684,6 +684,10 @@ rustc_queries! { separate_provide_extern } + query incoherent_impls(key: SimplifiedType) -> &'tcx [DefId] { + desc { |tcx| "collecting all inherent impls for `{:?}`", key } + } + /// The result of unsafety-checking this `LocalDefId`. query unsafety_check_result(key: LocalDefId) -> &'tcx mir::UnsafetyCheckResult { desc { |tcx| "unsafety-checking `{}`", tcx.def_path_str(key.to_def_id()) } @@ -1469,6 +1473,15 @@ rustc_queries! { separate_provide_extern } + /// Collects all incoherent impls for the given crate and type. + /// + /// Do not call this directly, but instead use the `incoherent_impls` query. + /// This query is only used to get the data necessary for that query. + query crate_incoherent_impls(key: (CrateNum, SimplifiedType)) -> &'tcx [DefId] { + desc { |tcx| "collecting all impls for a type in a crate" } + separate_provide_extern + } + query is_dllimport_foreign_item(def_id: DefId) -> bool { desc { |tcx| "is_dllimport_foreign_item({})", tcx.def_path_str(def_id) } } |
