Skip to content

Commit 55111d6

Browse files
committed
Auto merge of #89266 - cjgillot:session-ich, r=michaelwoerister
Move ICH to rustc_query_system Based on #89183 The StableHashingContext does not need to be in rustc_middle. This PR moves it to rustc_query_system. This will avoid a dependency between rustc_ast_lowering and rustc_middle in #89124.
2 parents 074f636 + b2ed9c4 commit 55111d6

File tree

77 files changed

+168
-221
lines changed

Some content is hidden

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

77 files changed

+168
-221
lines changed

Cargo.lock

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3671,6 +3671,7 @@ dependencies = [
36713671
"rustc_llvm",
36723672
"rustc_metadata",
36733673
"rustc_middle",
3674+
"rustc_query_system",
36743675
"rustc_serialize",
36753676
"rustc_session",
36763677
"rustc_span",
@@ -3704,6 +3705,7 @@ dependencies = [
37043705
"rustc_macros",
37053706
"rustc_metadata",
37063707
"rustc_middle",
3708+
"rustc_query_system",
37073709
"rustc_serialize",
37083710
"rustc_session",
37093711
"rustc_span",
@@ -3731,6 +3733,7 @@ dependencies = [
37313733
"rustc_macros",
37323734
"rustc_middle",
37333735
"rustc_mir_dataflow",
3736+
"rustc_query_system",
37343737
"rustc_session",
37353738
"rustc_span",
37363739
"rustc_target",
@@ -4165,6 +4168,7 @@ dependencies = [
41654168
"rustc_index",
41664169
"rustc_middle",
41674170
"rustc_mir_dataflow",
4171+
"rustc_query_system",
41684172
"rustc_serialize",
41694173
"rustc_session",
41704174
"rustc_span",
@@ -4295,13 +4299,17 @@ dependencies = [
42954299
"parking_lot",
42964300
"rustc-rayon-core",
42974301
"rustc_arena",
4302+
"rustc_ast",
42984303
"rustc_data_structures",
42994304
"rustc_errors",
4305+
"rustc_feature",
4306+
"rustc_hir",
43004307
"rustc_index",
43014308
"rustc_macros",
43024309
"rustc_serialize",
43034310
"rustc_session",
43044311
"rustc_span",
4312+
"rustc_target",
43054313
"smallvec",
43064314
"tracing",
43074315
]
@@ -4369,6 +4377,7 @@ dependencies = [
43694377
"rustc_errors",
43704378
"rustc_feature",
43714379
"rustc_fs_util",
4380+
"rustc_hir",
43724381
"rustc_lint_defs",
43734382
"rustc_macros",
43744383
"rustc_serialize",
@@ -4404,6 +4413,7 @@ dependencies = [
44044413
"rustc_data_structures",
44054414
"rustc_hir",
44064415
"rustc_middle",
4416+
"rustc_query_system",
44074417
"rustc_session",
44084418
"rustc_span",
44094419
"rustc_target",
@@ -4447,6 +4457,7 @@ dependencies = [
44474457
"rustc_macros",
44484458
"rustc_middle",
44494459
"rustc_parse_format",
4460+
"rustc_query_system",
44504461
"rustc_session",
44514462
"rustc_span",
44524463
"rustc_target",

compiler/rustc_attr/src/builtin.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,21 +66,21 @@ fn handle_errors(sess: &ParseSess, span: Span, error: AttrError) {
6666
}
6767
}
6868

69-
#[derive(Copy, Clone, PartialEq, Encodable, Decodable, Debug)]
69+
#[derive(Copy, Clone, PartialEq, Encodable, Decodable, Debug, HashStable_Generic)]
7070
pub enum InlineAttr {
7171
None,
7272
Hint,
7373
Always,
7474
Never,
7575
}
7676

77-
#[derive(Clone, Encodable, Decodable, Debug, PartialEq, Eq)]
77+
#[derive(Clone, Encodable, Decodable, Debug, PartialEq, Eq, HashStable_Generic)]
7878
pub enum InstructionSetAttr {
7979
ArmA32,
8080
ArmT32,
8181
}
8282

83-
#[derive(Clone, Encodable, Decodable, Debug)]
83+
#[derive(Clone, Encodable, Decodable, Debug, HashStable_Generic)]
8484
pub enum OptimizeAttr {
8585
None,
8686
Speed,

compiler/rustc_codegen_cranelift/src/archive.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ impl<'a> ArchiveBuilder<'a> for ArArchiveBuilder<'a> {
242242
fn inject_dll_import_lib(
243243
&mut self,
244244
_lib_name: &str,
245-
_dll_imports: &[rustc_middle::middle::cstore::DllImport],
245+
_dll_imports: &[rustc_session::cstore::DllImport],
246246
_tmpdir: &rustc_data_structures::temp_dir::MaybeTempDir,
247247
) {
248248
bug!("injecting dll imports is not supported");

compiler/rustc_codegen_gcc/src/archive.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
use std::fs::File;
22
use std::path::{Path, PathBuf};
33

4-
use rustc_session::Session;
54
use rustc_codegen_ssa::back::archive::ArchiveBuilder;
5+
use rustc_session::Session;
66

77
use rustc_data_structures::temp_dir::MaybeTempDir;
8-
use rustc_middle::middle::cstore::DllImport;
9-
8+
use rustc_session::cstore::DllImport;
109

1110
struct ArchiveConfig<'a> {
1211
sess: &'a Session,

compiler/rustc_codegen_llvm/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ rustc_hir = { path = "../rustc_hir" }
2626
rustc_index = { path = "../rustc_index" }
2727
rustc_llvm = { path = "../rustc_llvm" }
2828
rustc_metadata = { path = "../rustc_metadata" }
29+
rustc_query_system = { path = "../rustc_query_system" }
2930
rustc_session = { path = "../rustc_session" }
3031
rustc_serialize = { path = "../rustc_serialize" }
3132
rustc_target = { path = "../rustc_target" }

compiler/rustc_codegen_llvm/src/back/archive.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::llvm::archive_ro::{ArchiveRO, Child};
1111
use crate::llvm::{self, ArchiveKind, LLVMMachineType, LLVMRustCOFFShortExport};
1212
use rustc_codegen_ssa::back::archive::ArchiveBuilder;
1313
use rustc_data_structures::temp_dir::MaybeTempDir;
14-
use rustc_middle::middle::cstore::{DllCallingConvention, DllImport};
14+
use rustc_session::cstore::{DllCallingConvention, DllImport};
1515
use rustc_session::Session;
1616

1717
struct ArchiveConfig<'a> {

compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ use rustc_fs_util::path_to_c_string;
2626
use rustc_hir::def::CtorKind;
2727
use rustc_hir::def_id::{DefId, LOCAL_CRATE};
2828
use rustc_index::vec::{Idx, IndexVec};
29-
use rustc_middle::ich::NodeIdHashingMode;
3029
use rustc_middle::mir::{self, GeneratorLayout};
3130
use rustc_middle::ty::layout::{self, IntegerExt, LayoutOf, PrimitiveExt, TyAndLayout};
3231
use rustc_middle::ty::subst::GenericArgKind;
3332
use rustc_middle::ty::Instance;
3433
use rustc_middle::ty::{self, AdtKind, GeneratorSubsts, ParamEnv, Ty, TyCtxt};
3534
use rustc_middle::{bug, span_bug};
35+
use rustc_query_system::ich::NodeIdHashingMode;
3636
use rustc_session::config::{self, DebugInfo};
3737
use rustc_span::symbol::Symbol;
3838
use rustc_span::FileNameDisplayPreference;

compiler/rustc_codegen_ssa/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ rustc_incremental = { path = "../rustc_incremental" }
3333
rustc_index = { path = "../rustc_index" }
3434
rustc_macros = { path = "../rustc_macros" }
3535
rustc_metadata = { path = "../rustc_metadata" }
36+
rustc_query_system = { path = "../rustc_query_system" }
3637
rustc_target = { path = "../rustc_target" }
3738
rustc_session = { path = "../rustc_session" }
3839

compiler/rustc_codegen_ssa/src/back/archive.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use rustc_data_structures::temp_dir::MaybeTempDir;
2-
use rustc_middle::middle::cstore::DllImport;
2+
use rustc_session::cstore::DllImport;
33
use rustc_session::Session;
44
use rustc_span::symbol::Symbol;
55

compiler/rustc_codegen_ssa/src/back/link.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ use rustc_data_structures::temp_dir::MaybeTempDir;
33
use rustc_errors::{ErrorReported, Handler};
44
use rustc_fs_util::fix_windows_verbatim_for_gcc;
55
use rustc_hir::def_id::CrateNum;
6-
use rustc_middle::middle::cstore::DllImport;
76
use rustc_middle::middle::dependency_format::Linkage;
87
use rustc_session::config::{self, CFGuard, CrateType, DebugInfo, LdImpl, Strip};
98
use rustc_session::config::{OutputFilenames, OutputType, PrintRequest};
9+
use rustc_session::cstore::DllImport;
1010
use rustc_session::output::{check_file_is_writeable, invalid_output_for_target, out_filename};
1111
use rustc_session::search_paths::PathKind;
1212
use rustc_session::utils::NativeLibKind;

0 commit comments

Comments
 (0)