Skip to content

Commit 99d65b0

Browse files
committed
Simplify forcing.
1 parent 4d9e839 commit 99d65b0

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

compiler/rustc_query_system/src/query/plumbing.rs

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -441,20 +441,17 @@ where
441441
// promoted to the current session during
442442
// `try_mark_green()`, so we can ignore them here.
443443
let loaded = tcx.start_query(job_id, None, |tcx| {
444-
let marked = tcx.dep_graph().try_mark_green_and_read(tcx, &dep_node);
445-
marked.map(|(prev_dep_node_index, dep_node_index)| {
446-
(
447-
load_from_disk_and_cache_in_memory(
448-
tcx,
449-
key.clone(),
450-
prev_dep_node_index,
451-
dep_node_index,
452-
&dep_node,
453-
query,
454-
),
455-
dep_node_index,
456-
)
457-
})
444+
let (prev_dep_node_index, dep_node_index) =
445+
tcx.dep_graph().try_mark_green_and_read(tcx, &dep_node)?;
446+
let result = load_from_disk_and_cache_in_memory(
447+
tcx,
448+
key.clone(),
449+
prev_dep_node_index,
450+
dep_node_index,
451+
&dep_node,
452+
query,
453+
);
454+
Some((result, dep_node_index))
458455
});
459456
if let Some((result, dep_node_index)) = loaded {
460457
return (result, dep_node_index, false);

0 commit comments

Comments
 (0)