Skip to content

Commit 8a2bea9

Browse files
committed
Remove obsolete workaround.
1 parent 6e92fb4 commit 8a2bea9

File tree

1 file changed

+1
-34
lines changed

1 file changed

+1
-34
lines changed

compiler/rustc_query_impl/src/plumbing.rs

+1-34
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//! manage the caches, and so forth.
44
55
use super::queries;
6-
use rustc_middle::dep_graph::{DepKind, DepNode, DepNodeExt, DepNodeIndex, SerializedDepNodeIndex};
6+
use rustc_middle::dep_graph::{DepKind, DepNode, DepNodeIndex, SerializedDepNodeIndex};
77
use rustc_middle::ty::query::on_disk_cache;
88
use rustc_middle::ty::tls::{self, ImplicitCtxt};
99
use rustc_middle::ty::{self, TyCtxt};
@@ -60,39 +60,6 @@ impl QueryContext for QueryCtxt<'tcx> {
6060
}
6161

6262
fn try_force_from_dep_node(&self, dep_node: &DepNode) -> bool {
63-
// FIXME: This match is just a workaround for incremental bugs and should
64-
// be removed. https://github.com/rust-lang/rust/issues/62649 is one such
65-
// bug that must be fixed before removing this.
66-
match dep_node.kind {
67-
DepKind::hir_owner | DepKind::hir_owner_nodes => {
68-
if let Some(def_id) = dep_node.extract_def_id(**self) {
69-
let def_id = def_id.expect_local();
70-
let hir_id = self.tcx.hir().local_def_id_to_hir_id(def_id);
71-
if def_id != hir_id.owner {
72-
// This `DefPath` does not have a
73-
// corresponding `DepNode` (e.g. a
74-
// struct field), and the ` DefPath`
75-
// collided with the `DefPath` of a
76-
// proper item that existed in the
77-
// previous compilation session.
78-
//
79-
// Since the given `DefPath` does not
80-
// denote the item that previously
81-
// existed, we just fail to mark green.
82-
return false;
83-
}
84-
} else {
85-
// If the node does not exist anymore, we
86-
// just fail to mark green.
87-
return false;
88-
}
89-
}
90-
_ => {
91-
// For other kinds of nodes it's OK to be
92-
// forced.
93-
}
94-
}
95-
9663
debug!("try_force_from_dep_node({:?}) --- trying to force", dep_node);
9764

9865
// We must avoid ever having to call `force_from_dep_node()` for a

0 commit comments

Comments
 (0)