提交 0b143830 编写于 作者: M Michael Woerister

incr.comp.: Add 'tcx to QueryDescription.

上级 4bfab89a
此差异已折叠。
......@@ -25,8 +25,8 @@
use std::mem;
use syntax_pos::Span;
pub(super) struct QueryMap<D: QueryDescription> {
phantom: PhantomData<D>,
pub(super) struct QueryMap<'tcx, D: QueryDescription<'tcx>> {
phantom: PhantomData<(D, &'tcx ())>,
pub(super) map: FxHashMap<D::Key, QueryValue<D::Value>>,
}
......@@ -46,8 +46,8 @@ pub(super) fn new(value: T,
}
}
impl<M: QueryDescription> QueryMap<M> {
pub(super) fn new() -> QueryMap<M> {
impl<'tcx, M: QueryDescription<'tcx>> QueryMap<'tcx, M> {
pub(super) fn new() -> QueryMap<'tcx, M> {
QueryMap {
phantom: PhantomData,
map: FxHashMap(),
......@@ -547,7 +547,7 @@ fn clone(&self) -> Self { *self }
pub struct Maps<$tcx> {
providers: IndexVec<CrateNum, Providers<$tcx>>,
query_stack: RefCell<Vec<(Span, Query<$tcx>)>>,
$($(#[$attr])* $name: RefCell<QueryMap<queries::$name<$tcx>>>,)*
$($(#[$attr])* $name: RefCell<QueryMap<$tcx, queries::$name<$tcx>>>,)*
}
};
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册