Remove obsolete workaround.
This commit is contained in:
parent
6e92fb4098
commit
8a2bea931b
@ -3,7 +3,7 @@
|
||||
//! manage the caches, and so forth.
|
||||
|
||||
use super::queries;
|
||||
use rustc_middle::dep_graph::{DepKind, DepNode, DepNodeExt, DepNodeIndex, SerializedDepNodeIndex};
|
||||
use rustc_middle::dep_graph::{DepKind, DepNode, DepNodeIndex, SerializedDepNodeIndex};
|
||||
use rustc_middle::ty::query::on_disk_cache;
|
||||
use rustc_middle::ty::tls::{self, ImplicitCtxt};
|
||||
use rustc_middle::ty::{self, TyCtxt};
|
||||
@ -60,39 +60,6 @@ impl QueryContext for QueryCtxt<'tcx> {
|
||||
}
|
||||
|
||||
fn try_force_from_dep_node(&self, dep_node: &DepNode) -> bool {
|
||||
// FIXME: This match is just a workaround for incremental bugs and should
|
||||
// be removed. https://github.com/rust-lang/rust/issues/62649 is one such
|
||||
// bug that must be fixed before removing this.
|
||||
match dep_node.kind {
|
||||
DepKind::hir_owner | DepKind::hir_owner_nodes => {
|
||||
if let Some(def_id) = dep_node.extract_def_id(**self) {
|
||||
let def_id = def_id.expect_local();
|
||||
let hir_id = self.tcx.hir().local_def_id_to_hir_id(def_id);
|
||||
if def_id != hir_id.owner {
|
||||
// This `DefPath` does not have a
|
||||
// corresponding `DepNode` (e.g. a
|
||||
// struct field), and the ` DefPath`
|
||||
// collided with the `DefPath` of a
|
||||
// proper item that existed in the
|
||||
// previous compilation session.
|
||||
//
|
||||
// Since the given `DefPath` does not
|
||||
// denote the item that previously
|
||||
// existed, we just fail to mark green.
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
// If the node does not exist anymore, we
|
||||
// just fail to mark green.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
// For other kinds of nodes it's OK to be
|
||||
// forced.
|
||||
}
|
||||
}
|
||||
|
||||
debug!("try_force_from_dep_node({:?}) --- trying to force", dep_node);
|
||||
|
||||
// We must avoid ever having to call `force_from_dep_node()` for a
|
||||
|
Loading…
x
Reference in New Issue
Block a user