Skip to content

Commit 7c30f93

Browse files
committed
uniformly use rustc_session instead of rustc::session
1 parent 45ebd58 commit 7c30f93

File tree

107 files changed

+186
-172
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+186
-172
lines changed

Cargo.lock

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3625,6 +3625,7 @@ dependencies = [
36253625
"rustc_data_structures",
36263626
"rustc_hir",
36273627
"rustc_metadata",
3628+
"rustc_session",
36283629
"rustc_span",
36293630
"rustc_target",
36303631
]
@@ -3678,6 +3679,7 @@ dependencies = [
36783679
"rustc_parse",
36793680
"rustc_plugin_impl",
36803681
"rustc_save_analysis",
3682+
"rustc_session",
36813683
"rustc_span",
36823684
"rustc_target",
36833685
"serialize",
@@ -3792,6 +3794,7 @@ dependencies = [
37923794
"rustc_hir",
37933795
"rustc_index",
37943796
"rustc_macros",
3797+
"rustc_session",
37953798
"rustc_span",
37963799
"rustc_target",
37973800
"smallvec 1.0.0",
@@ -3904,6 +3907,7 @@ dependencies = [
39043907
"rustc_expand",
39053908
"rustc_hir",
39063909
"rustc_index",
3910+
"rustc_session",
39073911
"rustc_span",
39083912
"rustc_target",
39093913
"serialize",
@@ -3934,6 +3938,7 @@ dependencies = [
39343938
"rustc_infer",
39353939
"rustc_lexer",
39363940
"rustc_macros",
3941+
"rustc_session",
39373942
"rustc_span",
39383943
"rustc_target",
39393944
"rustc_trait_selection",
@@ -4014,6 +4019,7 @@ dependencies = [
40144019
"rustc_hir",
40154020
"rustc_lint",
40164021
"rustc_metadata",
4022+
"rustc_session",
40174023
"rustc_span",
40184024
]
40194025

@@ -4069,6 +4075,7 @@ dependencies = [
40694075
"rustc_data_structures",
40704076
"rustc_hir",
40714077
"rustc_parse",
4078+
"rustc_session",
40724079
"rustc_span",
40734080
"serde_json",
40744081
]
@@ -4175,6 +4182,7 @@ dependencies = [
41754182
"rustc_data_structures",
41764183
"rustc_hir",
41774184
"rustc_infer",
4185+
"rustc_session",
41784186
"rustc_span",
41794187
"rustc_target",
41804188
"rustc_trait_selection",
@@ -4194,6 +4202,7 @@ dependencies = [
41944202
"rustc_hir",
41954203
"rustc_index",
41964204
"rustc_infer",
4205+
"rustc_session",
41974206
"rustc_span",
41984207
"rustc_target",
41994208
"rustc_trait_selection",

src/librustc/ich/hcx.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ use crate::hir::map::definitions::Definitions;
22
use crate::hir::map::DefPathHash;
33
use crate::ich::{self, CachingSourceMapView};
44
use crate::middle::cstore::CrateStore;
5-
use crate::session::Session;
65
use crate::ty::{fast_reject, TyCtxt};
76

87
use rustc_ast::ast;
@@ -11,6 +10,7 @@ use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
1110
use rustc_data_structures::sync::Lrc;
1211
use rustc_hir as hir;
1312
use rustc_hir::def_id::{DefId, DefIndex};
13+
use rustc_session::Session;
1414
use rustc_span::source_map::SourceMap;
1515
use rustc_span::symbol::Symbol;
1616
use rustc_span::{BytePos, SourceFile};

src/librustc/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ pub mod infer;
8080
pub mod lint;
8181
pub mod middle;
8282
pub mod mir;
83-
pub use rustc_session as session;
8483
pub mod traits;
8584
pub mod ty;
8685

src/librustc/middle/cstore.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
55
use crate::hir::map as hir_map;
66
use crate::hir::map::definitions::{DefKey, DefPathTable};
7-
use crate::session::search_paths::PathKind;
8-
use crate::session::CrateDisambiguator;
97
use crate::ty::TyCtxt;
108

119
use rustc_ast::ast;
@@ -14,6 +12,8 @@ use rustc_data_structures::svh::Svh;
1412
use rustc_data_structures::sync::{self, MetadataRef};
1513
use rustc_hir::def_id::{CrateNum, DefId, LOCAL_CRATE};
1614
use rustc_macros::HashStable;
15+
use rustc_session::search_paths::PathKind;
16+
use rustc_session::CrateDisambiguator;
1717
use rustc_span::symbol::Symbol;
1818
use rustc_span::Span;
1919
use rustc_target::spec::Target;

src/librustc/middle/dependency_format.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//! For all the gory details, see the provider of the `dependency_formats`
55
//! query.
66
7-
use crate::session::config;
7+
use rustc_session::config;
88

99
/// A list of dependencies for a certain crate type.
1010
///

src/librustc/middle/limits.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
//! this via an attribute on the crate like `#![recursion_limit="22"]`. This pass
66
//! just peeks and looks for that attribute.
77
8-
use crate::session::Session;
98
use core::num::IntErrorKind;
109
use rustc::bug;
1110
use rustc_ast::ast;
11+
use rustc_session::Session;
1212
use rustc_span::symbol::{sym, Symbol};
1313

1414
use rustc_data_structures::sync::Once;

src/librustc/middle/stability.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
44
pub use self::StabilityLevel::*;
55

6-
use crate::session::{DiagnosticMessageId, Session};
76
use crate::ty::{self, TyCtxt};
87
use rustc_ast::ast::CRATE_NODE_ID;
98
use rustc_attr::{self as attr, ConstStability, Deprecation, RustcDeprecation, Stability};
@@ -17,6 +16,7 @@ use rustc_hir::{self, HirId};
1716
use rustc_session::lint::builtin::{DEPRECATED, DEPRECATED_IN_FUTURE, SOFT_UNSTABLE};
1817
use rustc_session::lint::{BuiltinLintDiagnostics, Lint, LintBuffer};
1918
use rustc_session::parse::feature_err_issue;
19+
use rustc_session::{DiagnosticMessageId, Session};
2020
use rustc_span::symbol::{sym, Symbol};
2121
use rustc_span::{MultiSpan, Span};
2222

src/librustc/mir/mono.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use crate::dep_graph::{DepConstructor, DepNode, WorkProduct, WorkProductId};
22
use crate::ich::{Fingerprint, NodeIdHashingMode, StableHashingContext};
3-
use crate::session::config::OptLevel;
43
use crate::ty::print::obsolete::DefPathBasedNames;
54
use crate::ty::{subst::InternalSubsts, Instance, InstanceDef, SymbolName, TyCtxt};
65
use rustc_attr::InlineAttr;
@@ -9,6 +8,7 @@ use rustc_data_structures::fx::FxHashMap;
98
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
109
use rustc_hir::def_id::{CrateNum, DefId, LOCAL_CRATE};
1110
use rustc_hir::HirId;
11+
use rustc_session::config::OptLevel;
1212
use rustc_span::source_map::Span;
1313
use rustc_span::symbol::Symbol;
1414
use std::fmt;

src/librustc/ty/layout.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
use crate::session::{self, DataTypeKind};
21
use crate::ty::{self, subst::SubstsRef, ReprOptions, Ty, TyCtxt, TypeFoldable};
32

43
use rustc_ast::ast::{self, Ident, IntTy, UintTy};
54
use rustc_attr as attr;
5+
use rustc_session::{self, DataTypeKind};
66
use rustc_span::DUMMY_SP;
77

88
use std::cmp;
@@ -1648,7 +1648,7 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
16481648
if min_size < field_end {
16491649
min_size = field_end;
16501650
}
1651-
session::FieldInfo {
1651+
rustc_session::FieldInfo {
16521652
name: name.to_string(),
16531653
offset: offset.bytes(),
16541654
size: field_layout.size.bytes(),
@@ -1658,12 +1658,12 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
16581658
})
16591659
.collect();
16601660

1661-
session::VariantInfo {
1661+
rustc_session::VariantInfo {
16621662
name: n.map(|n| n.to_string()),
16631663
kind: if layout.is_unsized() {
1664-
session::SizeKind::Min
1664+
rustc_session::SizeKind::Min
16651665
} else {
1666-
session::SizeKind::Exact
1666+
rustc_session::SizeKind::Exact
16671667
},
16681668
align: layout.align.abi.bytes(),
16691669
size: if min_size.bytes() == 0 { layout.size.bytes() } else { min_size.bytes() },

src/librustc/ty/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ use crate::middle::resolve_lifetime::ObjectLifetimeDefault;
1919
use crate::mir::interpret::ErrorHandled;
2020
use crate::mir::GeneratorLayout;
2121
use crate::mir::ReadOnlyBodyAndCache;
22-
use crate::session::DataTypeKind;
2322
use crate::traits::{self, Reveal};
2423
use crate::ty;
2524
use crate::ty::layout::VariantIdx;
@@ -42,6 +41,7 @@ use rustc_hir::{Constness, GlobMap, Node, TraitMap};
4241
use rustc_index::vec::{Idx, IndexVec};
4342
use rustc_macros::HashStable;
4443
use rustc_serialize::{self, Encodable, Encoder};
44+
use rustc_session::DataTypeKind;
4545
use rustc_span::hygiene::ExpnId;
4646
use rustc_span::symbol::{kw, sym, Symbol};
4747
use rustc_span::Span;

0 commit comments

Comments
 (0)