Skip to content

Commit 0f334c3

Browse files
committed
Check is_anon outside of can_reconstruct_query_key.
1 parent 5fcc537 commit 0f334c3

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

compiler/rustc_middle/src/dep_graph/dep_node.rs

+9-2
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ pub mod dep_kind {
230230
is_anon: true,
231231
is_eval_always: false,
232232

233-
can_reconstruct_query_key: || false,
233+
can_reconstruct_query_key: || true,
234234
force_from_dep_node: |_, _| false,
235235
try_load_from_on_disk_cache: |_, _| {},
236236
};
@@ -257,7 +257,6 @@ pub mod dep_kind {
257257

258258
#[inline(always)]
259259
fn can_reconstruct_query_key() -> bool {
260-
!is_anon &&
261260
<query_keys::$variant<'_> as DepNodeParams<TyCtxt<'_>>>
262261
::can_reconstruct_query_key()
263262
}
@@ -267,6 +266,10 @@ pub mod dep_kind {
267266
}
268267

269268
fn force_from_dep_node(tcx: TyCtxt<'_>, dep_node: &DepNode) -> bool {
269+
if is_anon {
270+
return false;
271+
}
272+
270273
if !can_reconstruct_query_key() {
271274
return false;
272275
}
@@ -285,6 +288,10 @@ pub mod dep_kind {
285288
}
286289

287290
fn try_load_from_on_disk_cache(tcx: TyCtxt<'_>, dep_node: &DepNode) {
291+
if is_anon {
292+
return
293+
}
294+
288295
if !can_reconstruct_query_key() {
289296
return
290297
}

0 commit comments

Comments
 (0)