Check is_anon outside of can_reconstruct_query_key.
This commit is contained in:
parent
5fcc537d18
commit
0f334c3642
@ -230,7 +230,7 @@ pub mod dep_kind {
|
|||||||
is_anon: true,
|
is_anon: true,
|
||||||
is_eval_always: false,
|
is_eval_always: false,
|
||||||
|
|
||||||
can_reconstruct_query_key: || false,
|
can_reconstruct_query_key: || true,
|
||||||
force_from_dep_node: |_, _| false,
|
force_from_dep_node: |_, _| false,
|
||||||
try_load_from_on_disk_cache: |_, _| {},
|
try_load_from_on_disk_cache: |_, _| {},
|
||||||
};
|
};
|
||||||
@ -257,7 +257,6 @@ pub mod dep_kind {
|
|||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
fn can_reconstruct_query_key() -> bool {
|
fn can_reconstruct_query_key() -> bool {
|
||||||
!is_anon &&
|
|
||||||
<query_keys::$variant<'_> as DepNodeParams<TyCtxt<'_>>>
|
<query_keys::$variant<'_> as DepNodeParams<TyCtxt<'_>>>
|
||||||
::can_reconstruct_query_key()
|
::can_reconstruct_query_key()
|
||||||
}
|
}
|
||||||
@ -267,6 +266,10 @@ pub mod dep_kind {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn force_from_dep_node(tcx: TyCtxt<'_>, dep_node: &DepNode) -> bool {
|
fn force_from_dep_node(tcx: TyCtxt<'_>, dep_node: &DepNode) -> bool {
|
||||||
|
if is_anon {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if !can_reconstruct_query_key() {
|
if !can_reconstruct_query_key() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -285,6 +288,10 @@ pub mod dep_kind {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn try_load_from_on_disk_cache(tcx: TyCtxt<'_>, dep_node: &DepNode) {
|
fn try_load_from_on_disk_cache(tcx: TyCtxt<'_>, dep_node: &DepNode) {
|
||||||
|
if is_anon {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if !can_reconstruct_query_key() {
|
if !can_reconstruct_query_key() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user