Remove extern crate rustc_middle from rustc_query_impl.

This commit is contained in:
Nicholas Nethercote 2024-05-08 20:25:42 +10:00
parent d49d4ae192
commit 573aa9f677
2 changed files with 4 additions and 6 deletions

View File

@ -8,9 +8,6 @@
#![allow(rustc::potential_query_instability, unused_parens)]
#![allow(internal_features)]
#[macro_use]
extern crate rustc_middle;
use crate::plumbing::{__rust_begin_short_backtrace, encode_all_query_results, try_mark_green};
use crate::profiling_support::QueryKeyStringCache;
use field_offset::offset_of;
@ -222,4 +219,4 @@ pub fn query_system<'tcx>(
}
}
rustc_query_append! { define_queries! }
rustc_middle::rustc_query_append! { define_queries! }

View File

@ -7,8 +7,8 @@ use rustc_data_structures::stable_hasher::{Hash64, HashStable, StableHasher};
use rustc_data_structures::sync::Lock;
use rustc_data_structures::unord::UnordMap;
use rustc_errors::DiagInner;
use rustc_index::Idx;
use rustc_middle::bug;
use rustc_middle::dep_graph::dep_kinds;
use rustc_middle::dep_graph::{
self, DepContext, DepKind, DepKindStruct, DepNode, DepNodeIndex, SerializedDepNodeIndex,
@ -781,6 +781,7 @@ macro_rules! define_queries {
#[allow(nonstandard_style)]
mod query_callbacks {
use super::*;
use rustc_middle::bug;
use rustc_query_system::dep_graph::FingerprintStyle;
// We use this for most things when incr. comp. is turned off.
@ -849,7 +850,7 @@ macro_rules! define_queries {
}
pub fn query_callbacks<'tcx>(arena: &'tcx Arena<'tcx>) -> &'tcx [DepKindStruct<'tcx>] {
arena.alloc_from_iter(make_dep_kind_array!(query_callbacks))
arena.alloc_from_iter(rustc_middle::make_dep_kind_array!(query_callbacks))
}
}
}