Revert some use of PtrKey to fix parallel_queries build

This commit is contained in:
Vadim Petrochenkov 2018-07-20 12:45:07 +03:00
parent e7aeb2b1c7
commit 382285a01d

View file

@ -11,7 +11,6 @@
#![allow(warnings)]
use std::mem;
use rustc_data_structures::ptr_key::PtrKey;
use rustc_data_structures::sync::{Lock, LockGuard, Lrc, Weak};
use rustc_data_structures::OnDrop;
use syntax_pos::Span;
@ -283,7 +282,7 @@ where
fn cycle_check<'tcx>(query: Lrc<QueryJob<'tcx>>,
span: Span,
stack: &mut Vec<(Span, Lrc<QueryJob<'tcx>>)>,
visited: &mut HashSet<PtrKey<'tcx, QueryJob<'tcx>>>
visited: &mut HashSet<*const QueryJob<'tcx>>
) -> Option<Option<Waiter<'tcx>>> {
if visited.contains(&query.as_ptr()) {
return if let Some(p) = stack.iter().position(|q| q.1.as_ptr() == query.as_ptr()) {
@ -322,7 +321,7 @@ fn cycle_check<'tcx>(query: Lrc<QueryJob<'tcx>>,
#[cfg(parallel_queries)]
fn connected_to_root<'tcx>(
query: Lrc<QueryJob<'tcx>>,
visited: &mut HashSet<PtrKey<'tcx, QueryJob<'tcx>>>
visited: &mut HashSet<*const QueryJob<'tcx>>
) -> bool {
// We already visited this or we're deliberately ignoring it
if visited.contains(&query.as_ptr()) {