Skip to content

Commit 3bbe2a2

Browse files
committed
Remove extern crate rustc_middle from rustc_query_impl.
1 parent 41613f3 commit 3bbe2a2

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

compiler/rustc_query_impl/src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
#![allow(rustc::potential_query_instability, unused_parens)]
99
#![allow(internal_features)]
1010

11-
#[macro_use]
12-
extern crate rustc_middle;
13-
1411
use crate::plumbing::{__rust_begin_short_backtrace, encode_all_query_results, try_mark_green};
1512
use crate::profiling_support::QueryKeyStringCache;
1613
use field_offset::offset_of;
@@ -222,4 +219,4 @@ pub fn query_system<'tcx>(
222219
}
223220
}
224221

225-
rustc_query_append! { define_queries! }
222+
rustc_middle::rustc_query_append! { define_queries! }

compiler/rustc_query_impl/src/plumbing.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,23 @@
22
//! generate the actual methods on tcx which find and execute the provider,
33
//! manage the caches, and so forth.
44
5-
use crate::rustc_middle::dep_graph::DepContext;
6-
use crate::rustc_middle::ty::TyEncoder;
75
use crate::QueryConfigRestored;
86
use rustc_data_structures::stable_hasher::{Hash64, HashStable, StableHasher};
97
use rustc_data_structures::sync::Lock;
108
use rustc_data_structures::unord::UnordMap;
119
use rustc_errors::DiagInner;
12-
1310
use rustc_index::Idx;
11+
use rustc_middle::bug;
1412
use rustc_middle::dep_graph::dep_kinds;
1513
use rustc_middle::dep_graph::{
16-
self, DepKind, DepKindStruct, DepNode, DepNodeIndex, SerializedDepNodeIndex,
14+
self, DepContext, DepKind, DepKindStruct, DepNode, DepNodeIndex, SerializedDepNodeIndex,
1715
};
1816
use rustc_middle::query::on_disk_cache::AbsoluteBytePos;
1917
use rustc_middle::query::on_disk_cache::{CacheDecoder, CacheEncoder, EncodedDepNodeIndex};
2018
use rustc_middle::query::Key;
2119
use rustc_middle::ty::print::with_reduced_queries;
2220
use rustc_middle::ty::tls::{self, ImplicitCtxt};
23-
use rustc_middle::ty::{self, TyCtxt};
21+
use rustc_middle::ty::{self, TyCtxt, TyEncoder};
2422
use rustc_query_system::dep_graph::{DepNodeParams, HasDepContext};
2523
use rustc_query_system::ich::StableHashingContext;
2624
use rustc_query_system::query::{
@@ -783,6 +781,7 @@ macro_rules! define_queries {
783781
#[allow(nonstandard_style)]
784782
mod query_callbacks {
785783
use super::*;
784+
use rustc_middle::bug;
786785
use rustc_query_system::dep_graph::FingerprintStyle;
787786

788787
// We use this for most things when incr. comp. is turned off.
@@ -851,7 +850,7 @@ macro_rules! define_queries {
851850
}
852851

853852
pub fn query_callbacks<'tcx>(arena: &'tcx Arena<'tcx>) -> &'tcx [DepKindStruct<'tcx>] {
854-
arena.alloc_from_iter(make_dep_kind_array!(query_callbacks))
853+
arena.alloc_from_iter(rustc_middle::make_dep_kind_array!(query_callbacks))
855854
}
856855
}
857856
}

0 commit comments

Comments
 (0)