Skip to content

Commit 7807faa

Browse files
committed
Disable ensure_done
1 parent 69370dc commit 7807faa

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

compiler/rustc_middle/src/query/plumbing.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,11 +457,11 @@ macro_rules! define_callbacks {
457457
$(#[$attr])*
458458
#[inline(always)]
459459
pub fn $name(self, key: query_helper_param_ty!($($K)*)) {
460-
crate::query::inner::query_ensure(
460+
crate::query::inner::query_get_at(
461461
self.tcx,
462+
DUMMY_SP,
462463
&self.tcx.query_system.query_vtables.$name,
463464
$crate::query::IntoQueryParam::into_query_param(key),
464-
$crate::query::EnsureMode::Done,
465465
);
466466
}
467467
)*

compiler/rustc_query_impl/src/execution.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ fn check_if_ensure_can_skip_execution<'tcx, C: QueryCache>(
630630
let dep_node = DepNode::construct(tcx, query.dep_kind, key);
631631

632632
let dep_graph = &tcx.dep_graph;
633-
let serialized_dep_node_index = match dep_graph.try_mark_green(tcx, &dep_node) {
633+
let _serialized_dep_node_index = match dep_graph.try_mark_green(tcx, &dep_node) {
634634
None => {
635635
// A None return from `try_mark_green` means that this is either
636636
// a new dep node or that the dep node has already been marked red.
@@ -655,11 +655,7 @@ fn check_if_ensure_can_skip_execution<'tcx, C: QueryCache>(
655655
EnsureCanSkip { skip_execution: true, dep_node: None }
656656
}
657657
EnsureMode::Done => {
658-
// In ensure-done mode, we can only skip execution for this key if
659-
// there's a disk-cached value available to load later if needed,
660-
// which guarantees the query provider will never run for this key.
661-
let is_loadable = (query.is_loadable_from_disk_fn)(tcx, key, serialized_dep_node_index);
662-
EnsureCanSkip { skip_execution: is_loadable, dep_node: Some(dep_node) }
658+
panic!()
663659
}
664660
}
665661
}

0 commit comments

Comments
 (0)