Skip to content

Commit d894f5e

Browse files
authored
Rollup merge of rust-lang#70373 - Centril:canon-imports, r=Mark-Simulacrum
normalize some imports & prefer direct ones r? @Mark-Simulacrum
2 parents cb17049 + 9172899 commit d894f5e

File tree

29 files changed

+45
-50
lines changed

29 files changed

+45
-50
lines changed

src/librustc/dep_graph/dep_node.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@
4949
//! user of the `DepNode` API of having to know how to compute the expected
5050
//! fingerprint for a given set of node parameters.
5151
52-
use crate::hir::map::DefPathHash;
53-
use crate::ich::Fingerprint;
5452
use crate::mir;
5553
use crate::mir::interpret::{GlobalId, LitToConstInput};
5654
use crate::traits;
@@ -62,7 +60,9 @@ use crate::traits::query::{
6260
use crate::ty::subst::SubstsRef;
6361
use crate::ty::{self, ParamEnvAnd, Ty, TyCtxt};
6462

63+
use rustc_data_structures::fingerprint::Fingerprint;
6564
use rustc_hir::def_id::{CrateNum, DefId, LocalDefId, CRATE_DEF_INDEX};
65+
use rustc_hir::definitions::DefPathHash;
6666
use rustc_hir::HirId;
6767
use rustc_span::symbol::Symbol;
6868
use std::hash::Hash;

src/librustc/hir/map/collector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use crate::arena::Arena;
2-
use crate::hir::map::definitions::{self, DefPathHash};
32
use crate::hir::map::{Entry, HirOwnerData, Map};
43
use crate::hir::{Owner, OwnerNodes, ParentedNode};
54
use crate::ich::StableHashingContext;
@@ -11,6 +10,7 @@ use rustc_data_structures::svh::Svh;
1110
use rustc_hir as hir;
1211
use rustc_hir::def_id::CRATE_DEF_INDEX;
1312
use rustc_hir::def_id::{LocalDefId, LOCAL_CRATE};
13+
use rustc_hir::definitions::{self, DefPathHash};
1414
use rustc_hir::intravisit::{self, NestedVisitorMap, Visitor};
1515
use rustc_hir::*;
1616
use rustc_index::vec::{Idx, IndexVec};

src/librustc/hir/map/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ use rustc_ast::ast::{self, Name, NodeId};
77
use rustc_data_structures::svh::Svh;
88
use rustc_hir::def::{DefKind, Res};
99
use rustc_hir::def_id::{CrateNum, DefId, LocalDefId, LOCAL_CRATE};
10-
pub use rustc_hir::definitions;
11-
pub use rustc_hir::definitions::{DefKey, DefPath, DefPathData, DefPathHash};
12-
pub use rustc_hir::definitions::{Definitions, DisambiguatedDefPathData};
10+
use rustc_hir::definitions::{DefKey, DefPath, Definitions};
1311
use rustc_hir::intravisit;
1412
use rustc_hir::itemlikevisit::ItemLikeVisitor;
1513
use rustc_hir::print::Nested;

src/librustc/ich/hcx.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
use crate::hir::map::definitions::{DefPathHash, Definitions};
2-
use crate::ich::{self, CachingSourceMapView};
1+
use crate::ich;
32
use crate::middle::cstore::CrateStore;
43
use crate::ty::{fast_reject, TyCtxt};
54

@@ -9,10 +8,11 @@ use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
98
use rustc_data_structures::sync::Lrc;
109
use rustc_hir as hir;
1110
use rustc_hir::def_id::{DefId, LocalDefId};
11+
use rustc_hir::definitions::{DefPathHash, Definitions};
1212
use rustc_session::Session;
1313
use rustc_span::source_map::SourceMap;
1414
use rustc_span::symbol::Symbol;
15-
use rustc_span::{BytePos, SourceFile};
15+
use rustc_span::{BytePos, CachingSourceMapView, SourceFile};
1616

1717
use smallvec::SmallVec;
1818
use std::cmp::Ord;

src/librustc/ich/impls_hir.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
//! This module contains `HashStable` implementations for various HIR data
22
//! types in no particular order.
33
4-
use crate::hir::map::DefPathHash;
5-
use crate::ich::{Fingerprint, NodeIdHashingMode, StableHashingContext};
4+
use crate::ich::{NodeIdHashingMode, StableHashingContext};
65
use rustc_attr as attr;
6+
use rustc_data_structures::fingerprint::Fingerprint;
77
use rustc_data_structures::stable_hasher::{HashStable, StableHasher, ToStableHashKey};
88
use rustc_hir as hir;
99
use rustc_hir::def_id::{CrateNum, DefId, LocalDefId, CRATE_DEF_INDEX};
10+
use rustc_hir::definitions::DefPathHash;
1011
use smallvec::SmallVec;
1112
use std::mem;
1213

src/librustc/ich/impls_ty.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
//! This module contains `HashStable` implementations for various data types
22
//! from rustc::ty in no particular order.
33
4-
use crate::ich::{Fingerprint, NodeIdHashingMode, StableHashingContext};
4+
use crate::ich::{NodeIdHashingMode, StableHashingContext};
55
use crate::middle::region;
66
use crate::mir;
77
use crate::ty;
8+
use rustc_data_structures::fingerprint::Fingerprint;
89
use rustc_data_structures::fx::FxHashMap;
910
use rustc_data_structures::stable_hasher::{HashStable, StableHasher, ToStableHashKey};
1011
use std::cell::RefCell;

src/librustc/ich/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
pub use self::hcx::{
44
hash_stable_trait_impls, NodeIdHashingMode, StableHashingContext, StableHashingContextProvider,
55
};
6-
crate use rustc_data_structures::fingerprint::Fingerprint;
76
use rustc_span::symbol::{sym, Symbol};
87
pub use rustc_span::CachingSourceMapView;
98

src/librustc/middle/cstore.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
55
pub use self::NativeLibraryKind::*;
66

7-
use crate::hir::map::definitions::{DefKey, DefPath, DefPathHash, DefPathTable};
87
use crate::ty::TyCtxt;
98

109
use rustc_ast::ast;
1110
use rustc_ast::expand::allocator::AllocatorKind;
1211
use rustc_data_structures::svh::Svh;
1312
use rustc_data_structures::sync::{self, MetadataRef};
1413
use rustc_hir::def_id::{CrateNum, DefId, LOCAL_CRATE};
14+
use rustc_hir::definitions::{DefKey, DefPath, DefPathHash, DefPathTable};
1515
use rustc_macros::HashStable;
1616
use rustc_session::search_paths::PathKind;
1717
pub use rustc_session::utils::NativeLibraryKind;

src/librustc/mir/interpret/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use super::{AllocId, CheckInAllocMsg, Pointer, RawConst, ScalarMaybeUndef};
22

3-
use crate::hir::map::definitions::DefPathData;
43
use crate::mir::interpret::ConstValue;
54
use crate::ty::layout::{Align, LayoutError, Size};
65
use crate::ty::query::TyCtxtAt;
@@ -11,6 +10,7 @@ use backtrace::Backtrace;
1110
use rustc_data_structures::sync::Lock;
1211
use rustc_errors::{struct_span_err, DiagnosticBuilder};
1312
use rustc_hir as hir;
13+
use rustc_hir::definitions::DefPathData;
1414
use rustc_macros::HashStable;
1515
use rustc_session::CtfeBacktrace;
1616
use rustc_span::{def_id::DefId, Pos, Span};

src/librustc/mir/mono.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
use crate::dep_graph::{DepConstructor, DepNode, WorkProduct, WorkProductId};
2-
use crate::ich::{Fingerprint, NodeIdHashingMode, StableHashingContext};
2+
use crate::ich::{NodeIdHashingMode, StableHashingContext};
33
use crate::ty::print::obsolete::DefPathBasedNames;
44
use crate::ty::{subst::InternalSubsts, Instance, InstanceDef, SymbolName, TyCtxt};
55
use rustc_attr::InlineAttr;
66
use rustc_data_structures::base_n;
7+
use rustc_data_structures::fingerprint::Fingerprint;
78
use rustc_data_structures::fx::FxHashMap;
89
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
910
use rustc_hir::def_id::{CrateNum, DefId, LOCAL_CRATE};

0 commit comments

Comments
 (0)