Skip to content

Commit 886c073

Browse files
committed
Remove re-export.
1 parent 44fc785 commit 886c073

File tree

27 files changed

+31
-30
lines changed

27 files changed

+31
-30
lines changed

Cargo.lock

+1
Original file line numberDiff line numberDiff line change
@@ -4247,6 +4247,7 @@ version = "0.0.0"
42474247
dependencies = [
42484248
"rustc_ast",
42494249
"rustc_attr",
4250+
"rustc_crate",
42504251
"rustc_data_structures",
42514252
"rustc_errors",
42524253
"rustc_hir",

compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ use crate::value::Value;
2020

2121
use rustc_ast as ast;
2222
use rustc_codegen_ssa::traits::*;
23+
use rustc_crate::ich::NodeIdHashingMode;
2324
use rustc_data_structures::const_cstr;
2425
use rustc_data_structures::fingerprint::Fingerprint;
2526
use rustc_data_structures::fx::FxHashMap;
@@ -28,7 +29,6 @@ use rustc_fs_util::path_to_c_string;
2829
use rustc_hir::def::CtorKind;
2930
use rustc_hir::def_id::{DefId, LOCAL_CRATE};
3031
use rustc_index::vec::{Idx, IndexVec};
31-
use rustc_middle::ich::NodeIdHashingMode;
3232
use rustc_middle::mir::{self, Field, GeneratorLayout};
3333
use rustc_middle::ty::layout::{self, IntegerExt, PrimitiveExt, TyAndLayout};
3434
use rustc_middle::ty::subst::GenericArgKind;

compiler/rustc_macros/src/hash_stable.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,13 @@ pub fn hash_stable_derive(mut s: synstructure::Structure<'_>) -> proc_macro2::To
115115
s.bound_impl(
116116
quote!(
117117
::rustc_data_structures::stable_hasher::HashStable<
118-
::rustc_middle::ich::StableHashingContext<'__ctx>,
118+
::rustc_crate::ich::StableHashingContext<'__ctx>,
119119
>
120120
),
121121
quote! {
122122
fn hash_stable(
123123
&self,
124-
__hcx: &mut ::rustc_middle::ich::StableHashingContext<'__ctx>,
124+
__hcx: &mut ::rustc_crate::ich::StableHashingContext<'__ctx>,
125125
__hasher: &mut ::rustc_data_structures::stable_hasher::StableHasher) {
126126
#discriminant
127127
match *self { #body }

compiler/rustc_middle/src/dep_graph/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
use crate::ich::StableHashingContext;
21
use crate::ty::query::try_load_from_on_disk_cache;
32
use crate::ty::{self, TyCtxt};
3+
use rustc_crate::ich::StableHashingContext;
44
use rustc_data_structures::profiling::SelfProfilerRef;
55
use rustc_data_structures::sync::Lock;
66
use rustc_data_structures::thin_vec::ThinVec;

compiler/rustc_middle/src/hir/map/collector.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use crate::arena::Arena;
22
use crate::hir::map::{Entry, HirOwnerData, Map};
33
use crate::hir::{Owner, OwnerNodes, ParentedNode};
4-
use crate::ich::StableHashingContext;
54
use rustc_crate::cstore::CrateStore;
5+
use rustc_crate::ich::StableHashingContext;
66
use rustc_data_structures::fingerprint::Fingerprint;
77
use rustc_data_structures::fx::FxHashMap;
88
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};

compiler/rustc_middle/src/hir/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ pub mod exports;
66
pub mod map;
77
pub mod place;
88

9-
use crate::ich::StableHashingContext;
109
use crate::ty::query::Providers;
1110
use crate::ty::TyCtxt;
11+
use rustc_crate::ich::StableHashingContext;
1212
use rustc_data_structures::fingerprint::Fingerprint;
1313
use rustc_data_structures::fx::FxHashMap;
1414
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};

compiler/rustc_middle/src/ich/impls_ty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
//! This module contains `HashStable` implementations for various data types
22
//! from `rustc_middle::ty` in no particular order.
33
4-
use crate::ich::StableHashingContext;
54
use crate::middle::region;
65
use crate::mir;
76
use crate::ty;
7+
use rustc_crate::ich::StableHashingContext;
88
use rustc_data_structures::fingerprint::Fingerprint;
99
use rustc_data_structures::fx::FxHashMap;
1010
use rustc_data_structures::stable_hasher::{HashStable, StableHasher, ToStableHashKey};

compiler/rustc_middle/src/ich/mod.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
//! ICH - Incremental Compilation Hash
22
33
use crate::ty::{fast_reject, TyCtxt};
4+
use rustc_crate::ich::{StableHashingContext, StableHashingContextProvider};
45
use rustc_data_structures::fx::FxHashMap;
56
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
67
use rustc_hir::def_id::DefId;
78
use smallvec::SmallVec;
89
use std::cmp::Ord;
910

10-
pub use rustc_crate::ich::{NodeIdHashingMode, StableHashingContext, StableHashingContextProvider};
11-
1211
mod impls_ty;
1312

1413
impl StableHashingContextProvider<'tcx> for TyCtxt<'tcx> {

compiler/rustc_middle/src/lint.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::cmp;
22

3-
use crate::ich::StableHashingContext;
3+
use rustc_crate::ich::StableHashingContext;
44
use rustc_data_structures::fx::FxHashMap;
55
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
66
use rustc_errors::{DiagnosticBuilder, DiagnosticId};

compiler/rustc_middle/src/middle/region.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
//!
77
//! [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/borrow_check.html
88
9-
use crate::ich::{NodeIdHashingMode, StableHashingContext};
109
use crate::ty::TyCtxt;
10+
use rustc_crate::ich::{NodeIdHashingMode, StableHashingContext};
1111
use rustc_hir as hir;
1212
use rustc_hir::Node;
1313

compiler/rustc_middle/src/mir/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ pub enum ImplicitSelfKind {
745745
CloneTypeFoldableAndLiftImpls! { BindingForm<'tcx>, }
746746

747747
mod binding_form_impl {
748-
use crate::ich::StableHashingContext;
748+
use rustc_crate::ich::StableHashingContext;
749749
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
750750

751751
impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for super::BindingForm<'tcx> {

compiler/rustc_middle/src/mir/mono.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use crate::dep_graph::{DepConstructor, DepNode, WorkProduct, WorkProductId};
2-
use crate::ich::{NodeIdHashingMode, StableHashingContext};
32
use crate::ty::{subst::InternalSubsts, Instance, InstanceDef, SymbolName, TyCtxt};
43
use rustc_attr::InlineAttr;
54
use rustc_crate::codegen_fn_attrs::{Linkage, Visibility};
5+
use rustc_crate::ich::{NodeIdHashingMode, StableHashingContext};
66
use rustc_data_structures::base_n;
77
use rustc_data_structures::fingerprint::Fingerprint;
88
use rustc_data_structures::fx::FxHashMap;

compiler/rustc_middle/src/traits/query.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
//! The providers for the queries defined here can be found in
66
//! `librustc_traits`.
77
8-
use crate::ich::StableHashingContext;
98
use crate::infer::canonical::{Canonical, QueryResponse};
109
use crate::ty::error::TypeError;
1110
use crate::ty::subst::GenericArg;
1211
use crate::ty::{self, Ty, TyCtxt};
1312

13+
use rustc_crate::ich::StableHashingContext;
1414
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
1515
use rustc_data_structures::sync::Lrc;
1616
use rustc_errors::struct_span_err;

compiler/rustc_middle/src/traits/specialization_graph.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
use crate::ich::{self, StableHashingContext};
1+
use crate::ich;
22
use crate::ty::fast_reject::SimplifiedType;
33
use crate::ty::fold::TypeFoldable;
44
use crate::ty::{self, TyCtxt};
5+
use rustc_crate::ich::StableHashingContext;
56
use rustc_data_structures::fx::FxHashMap;
67
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
78
use rustc_errors::ErrorReported;

compiler/rustc_middle/src/ty/context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
use crate::arena::Arena;
44
use crate::dep_graph::{self, DepConstructor, DepGraph};
55
use crate::hir::exports::ExportMap;
6-
use crate::ich::{NodeIdHashingMode, StableHashingContext};
76
use crate::infer::canonical::{Canonical, CanonicalVarInfo, CanonicalVarInfos};
87
use crate::lint::{struct_lint_level, LintDiagnosticBuilder, LintSource};
98
use crate::middle::resolve_lifetime::{self, ObjectLifetimeDefault};
@@ -24,6 +23,7 @@ use rustc_ast as ast;
2423
use rustc_ast::expand::allocator::AllocatorKind;
2524
use rustc_attr as attr;
2625
use rustc_crate::cstore::{CrateStoreDyn, EncodedMetadata};
26+
use rustc_crate::ich::{NodeIdHashingMode, StableHashingContext};
2727
use rustc_crate::stability;
2828
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
2929
use rustc_data_structures::profiling::SelfProfilerRef;

compiler/rustc_middle/src/ty/fast_reject.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
use crate::ich::StableHashingContext;
21
use crate::ty::{self, Ty, TyCtxt};
32
use rustc_ast as ast;
3+
use rustc_crate::ich::StableHashingContext;
44
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
55
use rustc_hir::def_id::DefId;
66
use std::fmt::Debug;

compiler/rustc_middle/src/ty/layout.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
use crate::ich::StableHashingContext;
21
use crate::mir::{GeneratorLayout, GeneratorSavedLocal};
32
use crate::ty::subst::Subst;
43
use crate::ty::{self, subst::SubstsRef, ReprOptions, Ty, TyCtxt, TypeFoldable};
54
use rustc_crate::codegen_fn_attrs::CodegenFnAttrFlags;
5+
use rustc_crate::ich::StableHashingContext;
66

77
use rustc_ast::{self as ast, IntTy, UintTy};
88
use rustc_attr as attr;

compiler/rustc_middle/src/ty/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ pub use self::IntVarValue::*;
66
pub use self::Variance::*;
77

88
use crate::hir::exports::ExportMap;
9-
use crate::ich::StableHashingContext;
109
use crate::middle::resolve_lifetime::ObjectLifetimeDefault;
1110
use crate::mir::interpret::ErrorHandled;
1211
use crate::mir::Body;
@@ -18,6 +17,7 @@ use crate::ty::util::{Discr, IntTypeExt};
1817
use rustc_ast as ast;
1918
use rustc_attr as attr;
2019
use rustc_crate::cstore::CrateStoreDyn;
20+
use rustc_crate::ich::StableHashingContext;
2121
use rustc_data_structures::captures::Captures;
2222
use rustc_data_structures::fingerprint::Fingerprint;
2323
use rustc_data_structures::fx::FxHashMap;

compiler/rustc_middle/src/ty/query/plumbing.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,8 @@ macro_rules! define_queries {
253253
[$($modifiers:tt)*] fn $name:ident($($K:tt)*) -> $V:ty,)*) => {
254254

255255
use std::mem;
256-
use crate::{
257-
rustc_data_structures::stable_hasher::HashStable,
258-
rustc_data_structures::stable_hasher::StableHasher,
259-
ich::StableHashingContext
260-
};
256+
use rustc_crate::ich::StableHashingContext;
257+
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
261258

262259
define_queries_struct! {
263260
tcx: $tcx,

compiler/rustc_middle/src/ty/trait_def.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
use crate::ich::{self, StableHashingContext};
1+
use crate::ich;
22
use crate::traits::specialization_graph;
33
use crate::ty::fast_reject;
44
use crate::ty::fold::TypeFoldable;
55
use crate::ty::{Ty, TyCtxt};
6+
use rustc_crate::ich::StableHashingContext;
67
use rustc_hir as hir;
78
use rustc_hir::def_id::{CrateNum, DefId};
89
use rustc_hir::definitions::DefPathHash;

compiler/rustc_middle/src/ty/util.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
//! Miscellaneous type-system utilities that are too small to deserve their own modules.
22
3-
use crate::ich::NodeIdHashingMode;
43
use crate::ty::fold::TypeFolder;
54
use crate::ty::layout::IntegerExt;
65
use crate::ty::query::TyCtxtAt;
@@ -11,6 +10,7 @@ use rustc_apfloat::Float as _;
1110
use rustc_ast as ast;
1211
use rustc_attr::{self as attr, SignedInt, UnsignedInt};
1312
use rustc_crate::codegen_fn_attrs::CodegenFnAttrFlags;
13+
use rustc_crate::ich::NodeIdHashingMode;
1414
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
1515
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
1616
use rustc_errors::ErrorReported;

compiler/rustc_mir/src/interpret/eval_context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ use std::cell::Cell;
22
use std::fmt;
33
use std::mem;
44

5+
use rustc_crate::ich::StableHashingContext;
56
use rustc_data_structures::fx::FxHashMap;
67
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
78
use rustc_hir::{self as hir, def::DefKind, def_id::DefId, definitions::DefPathData};
89
use rustc_index::vec::IndexVec;
910
use rustc_macros::HashStable;
10-
use rustc_middle::ich::StableHashingContext;
1111
use rustc_middle::mir;
1212
use rustc_middle::mir::interpret::{GlobalId, InterpResult, Pointer, Scalar};
1313
use rustc_middle::ty::layout::{self, TyAndLayout};

compiler/rustc_mir/src/transform/coverage/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ use spans::{CoverageSpan, CoverageSpans};
1515
use crate::transform::MirPass;
1616
use crate::util::pretty;
1717

18+
use rustc_crate::ich::StableHashingContext;
1819
use rustc_data_structures::fingerprint::Fingerprint;
1920
use rustc_data_structures::graph::WithNumNodes;
2021
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
2122
use rustc_data_structures::sync::Lrc;
2223
use rustc_index::vec::IndexVec;
2324
use rustc_middle::hir;
2425
use rustc_middle::hir::map::blocks::FnLikeNode;
25-
use rustc_middle::ich::StableHashingContext;
2626
use rustc_middle::mir::coverage::*;
2727
use rustc_middle::mir::{
2828
self, BasicBlock, BasicBlockData, Coverage, SourceInfo, Statement, StatementKind, Terminator,

compiler/rustc_symbol_mangling/src/legacy.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
use rustc_crate::ich::NodeIdHashingMode;
12
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
23
use rustc_hir::def_id::CrateNum;
34
use rustc_hir::definitions::{DefPathData, DisambiguatedDefPathData};
4-
use rustc_middle::ich::NodeIdHashingMode;
55
use rustc_middle::mir::interpret::{ConstValue, Scalar};
66
use rustc_middle::ty::print::{PrettyPrinter, Print, Printer};
77
use rustc_middle::ty::subst::{GenericArg, GenericArgKind};

compiler/rustc_trait_selection/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ tracing = "0.1"
1313
rustc_attr = { path = "../rustc_attr" }
1414
rustc_middle = { path = "../rustc_middle" }
1515
rustc_ast = { path = "../rustc_ast" }
16+
rustc_crate = { path = "../rustc_crate" }
1617
rustc_data_structures = { path = "../rustc_data_structures" }
1718
rustc_errors = { path = "../rustc_errors" }
1819
rustc_hir = { path = "../rustc_hir" }

src/tools/clippy/clippy_lints/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
extern crate rustc_ast;
2727
extern crate rustc_ast_pretty;
2828
extern crate rustc_attr;
29+
extern crate rustc_crate;
2930
extern crate rustc_data_structures;
3031
extern crate rustc_errors;
3132
extern crate rustc_hir;

src/tools/clippy/clippy_lints/src/utils/hir_utils.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
use crate::consts::{constant_context, constant_simple};
22
use crate::utils::differing_macro_contexts;
33
use rustc_ast::ast::InlineAsmTemplatePiece;
4+
use rustc_crate::ich::StableHashingContextProvider;
45
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
56
use rustc_hir::{
67
BinOpKind, Block, BlockCheckMode, BodyId, BorrowKind, CaptureBy, Expr, ExprKind, Field, FieldPat, FnRetTy,
78
GenericArg, GenericArgs, Guard, InlineAsmOperand, Lifetime, LifetimeName, ParamName, Pat, PatKind, Path,
89
PathSegment, QPath, Stmt, StmtKind, Ty, TyKind, TypeBinding,
910
};
1011
use rustc_lint::LateContext;
11-
use rustc_middle::ich::StableHashingContextProvider;
1212
use rustc_middle::ty::TypeckResults;
1313
use rustc_span::Symbol;
1414
use std::hash::Hash;

0 commit comments

Comments
 (0)