diff --git a/Cargo.lock b/Cargo.lock index 0afdced031e6..d7d19be42c58 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3640,7 +3640,6 @@ dependencies = [ "rustc_macros", "rustc_metadata", "rustc_middle", - "rustc_query_system", "rustc_sanitizers", "rustc_session", "rustc_span", @@ -4243,7 +4242,6 @@ dependencies = [ "rustc_index", "rustc_lint_defs", "rustc_macros", - "rustc_query_system", "rustc_serialize", "rustc_session", "rustc_span", @@ -4507,20 +4505,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "rustc_query_system" -version = "0.0.0" -dependencies = [ - "rustc_abi", - "rustc_ast", - "rustc_data_structures", - "rustc_feature", - "rustc_hir", - "rustc_session", - "rustc_span", - "smallvec", -] - [[package]] name = "rustc_resolve" version = "0.0.0" diff --git a/compiler/rustc_codegen_llvm/Cargo.toml b/compiler/rustc_codegen_llvm/Cargo.toml index 90c87494c3c5..0ffff2d331b1 100644 --- a/compiler/rustc_codegen_llvm/Cargo.toml +++ b/compiler/rustc_codegen_llvm/Cargo.toml @@ -31,7 +31,6 @@ rustc_llvm = { path = "../rustc_llvm" } rustc_macros = { path = "../rustc_macros" } rustc_metadata = { path = "../rustc_metadata" } rustc_middle = { path = "../rustc_middle" } -rustc_query_system = { path = "../rustc_query_system" } rustc_sanitizers = { path = "../rustc_sanitizers" } rustc_session = { path = "../rustc_session" } rustc_span = { path = "../rustc_span" } diff --git a/compiler/rustc_macros/src/hash_stable.rs b/compiler/rustc_macros/src/hash_stable.rs index a6396ba687d1..fa67adb406ed 100644 --- a/compiler/rustc_macros/src/hash_stable.rs +++ b/compiler/rustc_macros/src/hash_stable.rs @@ -96,7 +96,7 @@ fn hash_stable_derive_with_mode( let context: syn::Type = match mode { HashStableMode::Normal => { - parse_quote!(::rustc_query_system::ich::StableHashingContext<'__ctx>) + parse_quote!(::rustc_middle::ich::StableHashingContext<'__ctx>) } HashStableMode::Generic | HashStableMode::NoContext => parse_quote!(__CTX), }; diff --git a/compiler/rustc_middle/Cargo.toml b/compiler/rustc_middle/Cargo.toml index 121e77614725..8bad0e291bf8 100644 --- a/compiler/rustc_middle/Cargo.toml +++ b/compiler/rustc_middle/Cargo.toml @@ -26,7 +26,6 @@ rustc_hir_pretty = { path = "../rustc_hir_pretty" } rustc_index = { path = "../rustc_index" } rustc_lint_defs = { path = "../rustc_lint_defs" } rustc_macros = { path = "../rustc_macros" } -rustc_query_system = { path = "../rustc_query_system" } rustc_serialize = { path = "../rustc_serialize" } rustc_session = { path = "../rustc_session" } rustc_span = { path = "../rustc_span" } diff --git a/compiler/rustc_middle/src/dep_graph/dep_node.rs b/compiler/rustc_middle/src/dep_graph/dep_node.rs index 099a4613edf6..578277bce593 100644 --- a/compiler/rustc_middle/src/dep_graph/dep_node.rs +++ b/compiler/rustc_middle/src/dep_graph/dep_node.rs @@ -63,10 +63,10 @@ use rustc_data_structures::stable_hasher::{HashStable, StableHasher, StableOrd, use rustc_hir::def_id::DefId; use rustc_hir::definitions::DefPathHash; use rustc_macros::{Decodable, Encodable}; -use rustc_query_system::ich::StableHashingContext; use rustc_span::Symbol; use super::{FingerprintStyle, SerializedDepNodeIndex}; +use crate::ich::StableHashingContext; use crate::mir::mono::MonoItem; use crate::ty::{TyCtxt, tls}; diff --git a/compiler/rustc_middle/src/dep_graph/graph.rs b/compiler/rustc_middle/src/dep_graph/graph.rs index a243bbb34334..6a19c02bb81b 100644 --- a/compiler/rustc_middle/src/dep_graph/graph.rs +++ b/compiler/rustc_middle/src/dep_graph/graph.rs @@ -15,7 +15,6 @@ use rustc_data_structures::{assert_matches, outline}; use rustc_errors::DiagInner; use rustc_index::IndexVec; use rustc_macros::{Decodable, Encodable}; -use rustc_query_system::ich::StableHashingContext; use rustc_serialize::opaque::{FileEncodeResult, FileEncoder}; use rustc_session::Session; use tracing::{debug, instrument}; @@ -26,6 +25,7 @@ use super::query::DepGraphQuery; use super::serialized::{GraphEncoder, SerializedDepGraph, SerializedDepNodeIndex}; use super::{DepKind, DepNode, HasDepContext, WorkProductId, read_deps, with_deps}; use crate::dep_graph::edges::EdgesVec; +use crate::ich::StableHashingContext; use crate::ty::TyCtxt; use crate::verify_ich::incremental_verify_ich; diff --git a/compiler/rustc_query_system/src/ich/hcx.rs b/compiler/rustc_middle/src/ich/hcx.rs similarity index 100% rename from compiler/rustc_query_system/src/ich/hcx.rs rename to compiler/rustc_middle/src/ich/hcx.rs diff --git a/compiler/rustc_query_system/src/ich/impls_syntax.rs b/compiler/rustc_middle/src/ich/impls_syntax.rs similarity index 99% rename from compiler/rustc_query_system/src/ich/impls_syntax.rs rename to compiler/rustc_middle/src/ich/impls_syntax.rs index 5592f6553971..be4e5333c64b 100644 --- a/compiler/rustc_query_system/src/ich/impls_syntax.rs +++ b/compiler/rustc_middle/src/ich/impls_syntax.rs @@ -6,7 +6,7 @@ use rustc_span::{SourceFile, Symbol, sym}; use smallvec::SmallVec; use {rustc_ast as ast, rustc_hir as hir}; -use crate::ich::StableHashingContext; +use super::StableHashingContext; impl<'a> HashStable> for ast::NodeId { #[inline] diff --git a/compiler/rustc_query_system/src/ich/mod.rs b/compiler/rustc_middle/src/ich/mod.rs similarity index 100% rename from compiler/rustc_query_system/src/ich/mod.rs rename to compiler/rustc_middle/src/ich/mod.rs diff --git a/compiler/rustc_middle/src/lib.rs b/compiler/rustc_middle/src/lib.rs index 1c4c987aee92..5fa6f10865b5 100644 --- a/compiler/rustc_middle/src/lib.rs +++ b/compiler/rustc_middle/src/lib.rs @@ -72,6 +72,7 @@ pub mod arena; pub mod error; pub mod hir; pub mod hooks; +pub mod ich; pub mod infer; pub mod lint; pub mod metadata; diff --git a/compiler/rustc_middle/src/middle/privacy.rs b/compiler/rustc_middle/src/middle/privacy.rs index e3e04c9d1800..0be4c8243d63 100644 --- a/compiler/rustc_middle/src/middle/privacy.rs +++ b/compiler/rustc_middle/src/middle/privacy.rs @@ -8,9 +8,9 @@ use rustc_data_structures::fx::{FxIndexMap, IndexEntry}; use rustc_data_structures::stable_hasher::{HashStable, StableHasher}; use rustc_hir::def::DefKind; use rustc_macros::HashStable; -use rustc_query_system::ich::StableHashingContext; use rustc_span::def_id::{CRATE_DEF_ID, LocalDefId}; +use crate::ich::StableHashingContext; use crate::ty::{TyCtxt, Visibility}; /// Represents the levels of effective visibility an item can have. diff --git a/compiler/rustc_middle/src/mir/mod.rs b/compiler/rustc_middle/src/mir/mod.rs index 418cdea01660..9d0e4b5e6dfa 100644 --- a/compiler/rustc_middle/src/mir/mod.rs +++ b/compiler/rustc_middle/src/mir/mod.rs @@ -911,7 +911,8 @@ pub struct VarBindingIntroduction { mod binding_form_impl { use rustc_data_structures::stable_hasher::{HashStable, StableHasher}; - use rustc_query_system::ich::StableHashingContext; + + use crate::ich::StableHashingContext; impl<'a, 'tcx> HashStable> for super::BindingForm<'tcx> { fn hash_stable(&self, hcx: &mut StableHashingContext<'a>, hasher: &mut StableHasher) { diff --git a/compiler/rustc_middle/src/mir/mono.rs b/compiler/rustc_middle/src/mir/mono.rs index 577d226fc9d7..acebf91b1cbf 100644 --- a/compiler/rustc_middle/src/mir/mono.rs +++ b/compiler/rustc_middle/src/mir/mono.rs @@ -12,7 +12,6 @@ use rustc_hir::ItemId; use rustc_hir::attrs::{InlineAttr, Linkage}; use rustc_hir::def_id::{CrateNum, DefId, DefIdSet, LOCAL_CRATE}; use rustc_macros::{HashStable, TyDecodable, TyEncodable}; -use rustc_query_system::ich::StableHashingContext; use rustc_session::config::OptLevel; use rustc_span::{Span, Symbol}; use rustc_target::spec::SymbolVisibility; @@ -20,6 +19,7 @@ use tracing::debug; use crate::dep_graph::dep_node::{make_compile_codegen_unit, make_compile_mono_item}; use crate::dep_graph::{DepNode, WorkProduct, WorkProductId}; +use crate::ich::StableHashingContext; use crate::middle::codegen_fn_attrs::CodegenFnAttrFlags; use crate::ty::{self, GenericArgs, Instance, InstanceKind, SymbolName, Ty, TyCtxt}; diff --git a/compiler/rustc_middle/src/query/caches.rs b/compiler/rustc_middle/src/query/caches.rs index 7424492ddc1f..c1f5e5b67085 100644 --- a/compiler/rustc_middle/src/query/caches.rs +++ b/compiler/rustc_middle/src/query/caches.rs @@ -7,10 +7,10 @@ use rustc_data_structures::stable_hasher::HashStable; pub use rustc_data_structures::vec_cache::VecCache; use rustc_hir::def_id::LOCAL_CRATE; use rustc_index::Idx; -use rustc_query_system::ich::StableHashingContext; use rustc_span::def_id::{DefId, DefIndex}; use crate::dep_graph::DepNodeIndex; +use crate::ich::StableHashingContext; /// Traits that all query keys must satisfy. pub trait QueryCacheKey = Hash + Eq + Copy + Debug + for<'a> HashStable>; diff --git a/compiler/rustc_middle/src/query/plumbing.rs b/compiler/rustc_middle/src/query/plumbing.rs index 727e93148251..47b6aea077d1 100644 --- a/compiler/rustc_middle/src/query/plumbing.rs +++ b/compiler/rustc_middle/src/query/plumbing.rs @@ -8,12 +8,12 @@ use rustc_data_structures::sync::{AtomicU64, WorkerLocal}; use rustc_hir::def_id::{DefId, LocalDefId}; use rustc_hir::hir_id::OwnerId; use rustc_macros::HashStable; -use rustc_query_system::ich::StableHashingContext; use rustc_span::{ErrorGuaranteed, Span}; pub use sealed::IntoQueryParam; use crate::dep_graph; use crate::dep_graph::{DepKind, DepNodeIndex, SerializedDepNodeIndex}; +use crate::ich::StableHashingContext; use crate::queries::{ ExternProviders, PerQueryVTables, Providers, QueryArenas, QueryCaches, QueryEngine, QueryStates, }; @@ -102,9 +102,6 @@ pub enum QueryMode { } /// Stores function pointers and other metadata for a particular query. -/// -/// Used indirectly by query plumbing in `rustc_query_system` via a trait, -/// and also used directly by query plumbing in `rustc_query_impl`. pub struct QueryVTable<'tcx, C: QueryCache> { pub name: &'static str, pub eval_always: bool, diff --git a/compiler/rustc_middle/src/ty/adt.rs b/compiler/rustc_middle/src/ty/adt.rs index 510c546f82a4..242d3742abad 100644 --- a/compiler/rustc_middle/src/ty/adt.rs +++ b/compiler/rustc_middle/src/ty/adt.rs @@ -15,7 +15,6 @@ use rustc_hir::def_id::DefId; use rustc_hir::{self as hir, LangItem, find_attr}; use rustc_index::{IndexSlice, IndexVec}; use rustc_macros::{HashStable, TyDecodable, TyEncodable}; -use rustc_query_system::ich::StableHashingContext; use rustc_session::DataTypeKind; use rustc_type_ir::solve::AdtDestructorKind; use tracing::{debug, info, trace}; @@ -23,6 +22,7 @@ use tracing::{debug, info, trace}; use super::{ AsyncDestructor, Destructor, FieldDef, GenericPredicates, Ty, TyCtxt, VariantDef, VariantDiscr, }; +use crate::ich::StableHashingContext; use crate::mir::interpret::ErrorHandled; use crate::ty; use crate::ty::util::{Discr, IntTypeExt}; diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs index 430890d5a42d..94a77ce13c14 100644 --- a/compiler/rustc_middle/src/ty/context.rs +++ b/compiler/rustc_middle/src/ty/context.rs @@ -39,7 +39,6 @@ use rustc_hir::lang_items::LangItem; use rustc_hir::limit::Limit; use rustc_hir::{self as hir, HirId, Node, TraitCandidate, find_attr}; use rustc_index::IndexVec; -use rustc_query_system::ich::StableHashingContext; use rustc_serialize::opaque::{FileEncodeResult, FileEncoder}; use rustc_session::Session; use rustc_session::config::CrateType; @@ -55,6 +54,7 @@ use tracing::{debug, instrument}; use crate::arena::Arena; use crate::dep_graph::dep_node::make_metadata; use crate::dep_graph::{DepGraph, DepKindVTable, DepNodeIndex}; +use crate::ich::StableHashingContext; use crate::infer::canonical::{CanonicalParamEnvCache, CanonicalVarKind}; use crate::lint::lint_level; use crate::metadata::ModChild; @@ -1220,7 +1220,7 @@ impl<'tcx> TyCtxt<'tcx> { pub fn needs_crate_hash(self) -> bool { // Why is the crate hash needed for these configurations? // - debug_assertions: for the "fingerprint the result" check in - // `rustc_query_system::query::plumbing::execute_job`. + // `rustc_query_impl::execution::execute_job`. // - incremental: for query lookups. // - needs_metadata: for putting into crate metadata. // - instrument_coverage: for putting into coverage data (see diff --git a/compiler/rustc_middle/src/ty/impls_ty.rs b/compiler/rustc_middle/src/ty/impls_ty.rs index 95a1a1bf5bce..f06ce7324d4c 100644 --- a/compiler/rustc_middle/src/ty/impls_ty.rs +++ b/compiler/rustc_middle/src/ty/impls_ty.rs @@ -9,9 +9,9 @@ use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::stable_hasher::{ HashStable, HashingControls, StableHasher, ToStableHashKey, }; -use rustc_query_system::ich::StableHashingContext; use tracing::trace; +use crate::ich::StableHashingContext; use crate::middle::region; use crate::{mir, ty}; diff --git a/compiler/rustc_middle/src/ty/mod.rs b/compiler/rustc_middle/src/ty/mod.rs index 036397709925..2c7244187f4f 100644 --- a/compiler/rustc_middle/src/ty/mod.rs +++ b/compiler/rustc_middle/src/ty/mod.rs @@ -47,7 +47,6 @@ use rustc_macros::{ BlobDecodable, Decodable, Encodable, HashStable, TyDecodable, TyEncodable, TypeFoldable, TypeVisitable, extension, }; -use rustc_query_system::ich::StableHashingContext; use rustc_serialize::{Decodable, Encodable}; pub use rustc_session::lint::RegisteredTools; use rustc_span::hygiene::MacroKind; @@ -112,6 +111,7 @@ pub use self::typeck_results::{ Rust2024IncompatiblePatInfo, TypeckResults, UserType, UserTypeAnnotationIndex, UserTypeKind, }; use crate::error::{OpaqueHiddenTypeMismatch, TypeMismatchReason}; +use crate::ich::StableHashingContext; use crate::metadata::{AmbigModChild, ModChild}; use crate::middle::privacy::EffectiveVisibilities; use crate::mir::{Body, CoroutineLayout, CoroutineSavedLocal, SourceInfo}; diff --git a/compiler/rustc_middle/src/verify_ich.rs b/compiler/rustc_middle/src/verify_ich.rs index 290786d439d4..ff3c5bb5a9d6 100644 --- a/compiler/rustc_middle/src/verify_ich.rs +++ b/compiler/rustc_middle/src/verify_ich.rs @@ -1,10 +1,10 @@ use std::cell::Cell; use rustc_data_structures::fingerprint::Fingerprint; -use rustc_query_system::ich::StableHashingContext; use tracing::instrument; use crate::dep_graph::{DepGraphData, SerializedDepNodeIndex}; +use crate::ich::StableHashingContext; use crate::ty::TyCtxt; #[inline] diff --git a/compiler/rustc_query_system/Cargo.toml b/compiler/rustc_query_system/Cargo.toml deleted file mode 100644 index 8ea5b6c5487b..000000000000 --- a/compiler/rustc_query_system/Cargo.toml +++ /dev/null @@ -1,16 +0,0 @@ -[package] -name = "rustc_query_system" -version = "0.0.0" -edition = "2024" - -[dependencies] -# tidy-alphabetical-start -rustc_abi = { path = "../rustc_abi" } -rustc_ast = { path = "../rustc_ast" } -rustc_data_structures = { path = "../rustc_data_structures" } -rustc_feature = { path = "../rustc_feature" } -rustc_hir = { path = "../rustc_hir" } -rustc_session = { path = "../rustc_session" } -rustc_span = { path = "../rustc_span" } -smallvec = { version = "1.8.1", features = ["union", "may_dangle"] } -# tidy-alphabetical-end diff --git a/compiler/rustc_query_system/src/lib.rs b/compiler/rustc_query_system/src/lib.rs deleted file mode 100644 index 21c8650ea56a..000000000000 --- a/compiler/rustc_query_system/src/lib.rs +++ /dev/null @@ -1,7 +0,0 @@ -// tidy-alphabetical-start -#![allow(internal_features)] -#![cfg_attr(bootstrap, feature(assert_matches))] -#![feature(min_specialization)] -// tidy-alphabetical-end - -pub mod ich; diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_bench.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_bench.snap index 3adf952d66e0..294623f07386 100644 --- a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_bench.snap +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_bench.snap @@ -79,7 +79,6 @@ expression: bench - Set({bench::compiler/rustc_public}) - Set({bench::compiler/rustc_public_bridge}) - Set({bench::compiler/rustc_query_impl}) - - Set({bench::compiler/rustc_query_system}) - Set({bench::compiler/rustc_resolve}) - Set({bench::compiler/rustc_sanitizers}) - Set({bench::compiler/rustc_serialize}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_build_compiler.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_build_compiler.snap index 1d6e63696b06..d5da908c8a44 100644 --- a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_build_compiler.snap +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_build_compiler.snap @@ -61,7 +61,6 @@ expression: build compiler - Set({build::compiler/rustc_public}) - Set({build::compiler/rustc_public_bridge}) - Set({build::compiler/rustc_query_impl}) - - Set({build::compiler/rustc_query_system}) - Set({build::compiler/rustc_resolve}) - Set({build::compiler/rustc_sanitizers}) - Set({build::compiler/rustc_serialize}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check.snap index 6fc2e190290e..242a2272b4d1 100644 --- a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check.snap +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check.snap @@ -63,7 +63,6 @@ expression: check - Set({check::compiler/rustc_public}) - Set({check::compiler/rustc_public_bridge}) - Set({check::compiler/rustc_query_impl}) - - Set({check::compiler/rustc_query_system}) - Set({check::compiler/rustc_resolve}) - Set({check::compiler/rustc_sanitizers}) - Set({check::compiler/rustc_serialize}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_compiler.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_compiler.snap index c0456f7f84d3..dab86b792127 100644 --- a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_compiler.snap +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_compiler.snap @@ -63,7 +63,6 @@ expression: check compiler - Set({check::compiler/rustc_public}) - Set({check::compiler/rustc_public_bridge}) - Set({check::compiler/rustc_query_impl}) - - Set({check::compiler/rustc_query_system}) - Set({check::compiler/rustc_resolve}) - Set({check::compiler/rustc_sanitizers}) - Set({check::compiler/rustc_serialize}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_compiletest_include_default_paths.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_compiletest_include_default_paths.snap index 10f36ffa6748..e43d5380a398 100644 --- a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_compiletest_include_default_paths.snap +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_check_compiletest_include_default_paths.snap @@ -63,7 +63,6 @@ expression: check compiletest --include-default-paths - Set({check::compiler/rustc_public}) - Set({check::compiler/rustc_public_bridge}) - Set({check::compiler/rustc_query_impl}) - - Set({check::compiler/rustc_query_system}) - Set({check::compiler/rustc_resolve}) - Set({check::compiler/rustc_sanitizers}) - Set({check::compiler/rustc_serialize}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_clippy.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_clippy.snap index 492a10d3862a..827f2f8b60ac 100644 --- a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_clippy.snap +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_clippy.snap @@ -78,7 +78,6 @@ expression: clippy - Set({clippy::compiler/rustc_public}) - Set({clippy::compiler/rustc_public_bridge}) - Set({clippy::compiler/rustc_query_impl}) - - Set({clippy::compiler/rustc_query_system}) - Set({clippy::compiler/rustc_resolve}) - Set({clippy::compiler/rustc_sanitizers}) - Set({clippy::compiler/rustc_serialize}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_fix.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_fix.snap index 41889cd12480..d380cb416acf 100644 --- a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_fix.snap +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_fix.snap @@ -63,7 +63,6 @@ expression: fix - Set({fix::compiler/rustc_public}) - Set({fix::compiler/rustc_public_bridge}) - Set({fix::compiler/rustc_query_impl}) - - Set({fix::compiler/rustc_query_system}) - Set({fix::compiler/rustc_resolve}) - Set({fix::compiler/rustc_sanitizers}) - Set({fix::compiler/rustc_serialize}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test.snap index 51e2c270e3ba..ac2f315d39d9 100644 --- a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test.snap +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test.snap @@ -129,7 +129,6 @@ expression: test - Set({test::compiler/rustc_public}) - Set({test::compiler/rustc_public_bridge}) - Set({test::compiler/rustc_query_impl}) - - Set({test::compiler/rustc_query_system}) - Set({test::compiler/rustc_resolve}) - Set({test::compiler/rustc_sanitizers}) - Set({test::compiler/rustc_serialize}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_coverage.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_coverage.snap index bc828c162bb0..09adbb0041ae 100644 --- a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_coverage.snap +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_coverage.snap @@ -128,7 +128,6 @@ expression: test --skip=coverage - Set({test::compiler/rustc_public}) - Set({test::compiler/rustc_public_bridge}) - Set({test::compiler/rustc_query_impl}) - - Set({test::compiler/rustc_query_system}) - Set({test::compiler/rustc_resolve}) - Set({test::compiler/rustc_sanitizers}) - Set({test::compiler/rustc_serialize}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_tests.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_tests.snap index ceb910e4cb36..b5fccfcb966b 100644 --- a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_tests.snap +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_tests.snap @@ -92,7 +92,6 @@ expression: test --skip=tests - Set({test::compiler/rustc_public}) - Set({test::compiler/rustc_public_bridge}) - Set({test::compiler/rustc_query_impl}) - - Set({test::compiler/rustc_query_system}) - Set({test::compiler/rustc_resolve}) - Set({test::compiler/rustc_sanitizers}) - Set({test::compiler/rustc_serialize}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_tests_etc.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_tests_etc.snap index f0e8f1aee2c7..9ad8914f58e3 100644 --- a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_tests_etc.snap +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_tests_etc.snap @@ -72,7 +72,6 @@ expression: test --skip=tests --skip=coverage-map --skip=coverage-run --skip=lib - Set({test::compiler/rustc_public}) - Set({test::compiler/rustc_public_bridge}) - Set({test::compiler/rustc_query_impl}) - - Set({test::compiler/rustc_query_system}) - Set({test::compiler/rustc_resolve}) - Set({test::compiler/rustc_sanitizers}) - Set({test::compiler/rustc_serialize}) diff --git a/src/bootstrap/src/core/builder/tests.rs b/src/bootstrap/src/core/builder/tests.rs index 61db494c8c18..002fb32dcf0c 100644 --- a/src/bootstrap/src/core/builder/tests.rs +++ b/src/bootstrap/src/core/builder/tests.rs @@ -1815,7 +1815,7 @@ mod snapshot { insta::assert_snapshot!( ctx.config("check") .path("compiler") - .render_steps(), @"[check] rustc 0 -> rustc 1 (74 crates)"); + .render_steps(), @"[check] rustc 0 -> rustc 1 (73 crates)"); } #[test] @@ -1841,7 +1841,7 @@ mod snapshot { ctx.config("check") .path("compiler") .stage(1) - .render_steps(), @"[check] rustc 0 -> rustc 1 (74 crates)"); + .render_steps(), @"[check] rustc 0 -> rustc 1 (73 crates)"); } #[test] @@ -1851,11 +1851,11 @@ mod snapshot { ctx.config("check") .path("compiler") .stage(2) - .render_steps(), @r" + .render_steps(), @" [build] llvm [build] rustc 0 -> rustc 1 [build] rustc 1 -> std 1 - [check] rustc 1 -> rustc 2 (74 crates) + [check] rustc 1 -> rustc 2 (73 crates) "); } @@ -1866,12 +1866,12 @@ mod snapshot { ctx.config("check") .targets(&[TEST_TRIPLE_1]) .hosts(&[TEST_TRIPLE_1]) - .render_steps(), @r" + .render_steps(), @" [build] llvm [build] rustc 0 -> rustc 1 [build] rustc 1 -> std 1 [check] rustc 1 -> std 1 - [check] rustc 1 -> rustc 2 (74 crates) + [check] rustc 1 -> rustc 2 (73 crates) [check] rustc 1 -> rustc 2 [check] rustc 1 -> Rustdoc 2 [check] rustc 1 -> rustc_codegen_cranelift 2 @@ -1967,7 +1967,7 @@ mod snapshot { ctx.config("check") .paths(&["library", "compiler"]) .args(&args) - .render_steps(), @"[check] rustc 0 -> rustc 1 (74 crates)"); + .render_steps(), @"[check] rustc 0 -> rustc 1 (73 crates)"); } #[test] diff --git a/src/doc/rustc-dev-guide/src/queries/incremental-compilation-in-detail.md b/src/doc/rustc-dev-guide/src/queries/incremental-compilation-in-detail.md index 46e38832e64d..cab9f6871f7c 100644 --- a/src/doc/rustc-dev-guide/src/queries/incremental-compilation-in-detail.md +++ b/src/doc/rustc-dev-guide/src/queries/incremental-compilation-in-detail.md @@ -178,7 +178,7 @@ fn try_mark_green(tcx, current_node) -> bool { > NOTE: > The actual implementation can be found in -> [`compiler/rustc_query_system/src/dep_graph/graph.rs`][try_mark_green] +> [`compiler/rustc_middle/src/dep_graph/graph.rs`][try_mark_green] By using red-green marking we can avoid the devastating cumulative effect of having false positives during change detection. Whenever a query is executed @@ -534,4 +534,4 @@ information. [query-model]: ./query-evaluation-model-in-detail.html -[try_mark_green]: https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_query_system/dep_graph/graph.rs.html +[try_mark_green]: https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_middle/dep_graph/graph.rs.html diff --git a/tests/run-make/short-ice/rmake.rs b/tests/run-make/short-ice/rmake.rs index 4fc183a8c74e..043f880abcf7 100644 --- a/tests/run-make/short-ice/rmake.rs +++ b/tests/run-make/short-ice/rmake.rs @@ -31,10 +31,10 @@ fn main() { let output_bt_full = &concat_stderr_stdout(&rustc_bt_full); // Count how many lines of output mention symbols or paths in - // `rustc_query_system` or `rustc_query_impl`, which are the kinds of + // `rustc_query_impl`, which are the kinds of // stack frames we want to be omitting in short backtraces. - let rustc_query_count_short = count_lines_with(output_bt_short, "rustc_query_"); - let rustc_query_count_full = count_lines_with(output_bt_full, "rustc_query_"); + let rustc_query_count_short = count_lines_with(output_bt_short, "rustc_query_impl"); + let rustc_query_count_full = count_lines_with(output_bt_full, "rustc_query_impl"); // Dump both outputs in full to make debugging easier, especially on CI. // Use `--no-capture --force-rerun` to view output even when the test is passing. diff --git a/tests/ui-fulldeps/hash-stable-is-unstable.rs b/tests/ui-fulldeps/hash-stable-is-unstable.rs index 7f62b6044104..a3dfd7e85ba6 100644 --- a/tests/ui-fulldeps/hash-stable-is-unstable.rs +++ b/tests/ui-fulldeps/hash-stable-is-unstable.rs @@ -7,7 +7,7 @@ extern crate rustc_macros; //~^ ERROR use of unstable library feature `rustc_private` //~| NOTE: see issue #27812 for more information //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -extern crate rustc_query_system; +extern crate rustc_middle; //~^ ERROR use of unstable library feature `rustc_private` //~| NOTE: see issue #27812 for more information //~| NOTE: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date diff --git a/tests/ui-fulldeps/hash-stable-is-unstable.stderr b/tests/ui-fulldeps/hash-stable-is-unstable.stderr index e7740d744b4f..7c69e8f5e631 100644 --- a/tests/ui-fulldeps/hash-stable-is-unstable.stderr +++ b/tests/ui-fulldeps/hash-stable-is-unstable.stderr @@ -21,8 +21,8 @@ LL | extern crate rustc_macros; error[E0658]: use of unstable library feature `rustc_private`: this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? --> $DIR/hash-stable-is-unstable.rs:10:1 | -LL | extern crate rustc_query_system; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +LL | extern crate rustc_middle; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #27812 for more information = help: add `#![feature(rustc_private)]` to the crate attributes to enable diff --git a/triagebot.toml b/triagebot.toml index c9d6c1a730b7..6c6daac9cf3b 100644 --- a/triagebot.toml +++ b/triagebot.toml @@ -540,7 +540,6 @@ trigger_files = [ [autolabel."A-query-system"] trigger_files = [ - "compiler/rustc_query_system", "compiler/rustc_query_impl", "compiler/rustc_macros/src/query.rs" ] @@ -1557,8 +1556,10 @@ dep-bumps = [ "/compiler/rustc_codegen_llvm/src/debuginfo" = ["compiler", "debuginfo"] "/compiler/rustc_codegen_ssa" = ["compiler", "codegen"] "/compiler/rustc_middle/src/dep_graph" = ["compiler", "incremental", "query-system"] +"/compiler/rustc_middle/src/ich" = ["compiler", "incremental", "query-system"] "/compiler/rustc_middle/src/mir" = ["compiler", "mir"] "/compiler/rustc_middle/src/traits" = ["compiler", "types"] +"/compiler/rustc_middle/src/query" = ["compiler", "query-system"] "/compiler/rustc_middle/src/ty" = ["compiler", "types"] "/compiler/rustc_const_eval/src/interpret" = ["compiler", "mir"] "/compiler/rustc_mir_build/src/builder" = ["compiler", "mir"] @@ -1567,8 +1568,6 @@ dep-bumps = [ "/compiler/rustc_parse" = ["compiler", "parser"] "/compiler/rustc_parse/src/lexer" = ["compiler", "lexer"] "/compiler/rustc_query_impl" = ["compiler", "query-system"] -"/compiler/rustc_query_system" = ["compiler", "query-system"] -"/compiler/rustc_query_system/src/ich" = ["compiler", "incremental", "query-system"] "/compiler/rustc_trait_selection" = ["compiler", "types"] "/compiler/rustc_traits" = ["compiler", "types"] "/compiler/rustc_type_ir" = ["compiler", "types"]