diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2020-03-07 01:01:01 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2020-03-16 09:11:30 +0100 |
| commit | cf238fd057651371731fde47a2ebf251bf37cfb5 (patch) | |
| tree | 20e5ba77f1e4f59ba4bb21d4d2ec53f423d71ccc /src/librustc/ty | |
| parent | fc82376bc437d4494832b171d924e2f116174578 (diff) | |
| download | rust-cf238fd057651371731fde47a2ebf251bf37cfb5.tar.gz rust-cf238fd057651371731fde47a2ebf251bf37cfb5.zip | |
Inline QueryAccessor::query.
Diffstat (limited to 'src/librustc/ty')
| -rw-r--r-- | src/librustc/ty/query/config.rs | 4 | ||||
| -rw-r--r-- | src/librustc/ty/query/plumbing.rs | 7 |
2 files changed, 2 insertions, 9 deletions
diff --git a/src/librustc/ty/query/config.rs b/src/librustc/ty/query/config.rs index 5a05acc90e4..29b9e0c3b40 100644 --- a/src/librustc/ty/query/config.rs +++ b/src/librustc/ty/query/config.rs @@ -2,7 +2,7 @@ use crate::dep_graph::SerializedDepNodeIndex; use crate::dep_graph::{DepKind, DepNode}; use crate::ty::query::caches::QueryCache; use crate::ty::query::plumbing::CycleError; -use crate::ty::query::{Query, QueryState}; +use crate::ty::query::QueryState; use crate::ty::TyCtxt; use rustc_data_structures::profiling::ProfileCategory; use rustc_hir::def_id::DefId; @@ -32,8 +32,6 @@ pub(crate) trait QueryAccessors<'tcx>: QueryConfig<'tcx> { type Cache: QueryCache<Self::Key, Self::Value>; - fn query(key: Self::Key) -> Query<'tcx>; - // Don't use this method to access query results, instead use the methods on TyCtxt fn query_state<'a>(tcx: TyCtxt<'tcx>) -> &'a QueryState<'tcx, Self>; diff --git a/src/librustc/ty/query/plumbing.rs b/src/librustc/ty/query/plumbing.rs index 603c4fd9b72..32138b3e1d5 100644 --- a/src/librustc/ty/query/plumbing.rs +++ b/src/librustc/ty/query/plumbing.rs @@ -877,7 +877,7 @@ macro_rules! define_queries_inner { }; let info = QueryInfo { span: job.span, - query: queries::$name::query(k.clone()) + query: Query::$name(k.clone()) }; Some((id, QueryJobInfo { info, job: job.clone() })) } else { @@ -966,11 +966,6 @@ macro_rules! define_queries_inner { type Cache = query_storage!([$($modifiers)*][$K, $V]); #[inline(always)] - fn query(key: Self::Key) -> Query<'tcx> { - Query::$name(key) - } - - #[inline(always)] fn query_state<'a>(tcx: TyCtxt<$tcx>) -> &'a QueryState<$tcx, Self> { &tcx.queries.$name } |
