Inline QueryAccessor::query.
This commit is contained in:
parent
fc82376bc4
commit
cf238fd057
2 changed files with 2 additions and 9 deletions
|
|
@ -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>;
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
@ -965,11 +965,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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue