Move rustc_middle::query::values to rustc_query_impl.
Because all uses are now in `rustc_query_impl`. This was made possible by the previous commit. Less code in `rustc_middle`, hooray.
This commit is contained in:
parent
066a935b0c
commit
923de04f6a
5 changed files with 9 additions and 7 deletions
|
|
@ -4493,6 +4493,7 @@ name = "rustc_query_impl"
|
|||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"measureme",
|
||||
"rustc_abi",
|
||||
"rustc_data_structures",
|
||||
"rustc_errors",
|
||||
"rustc_hashes",
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ mod keys;
|
|||
pub mod on_disk_cache;
|
||||
#[macro_use]
|
||||
pub mod plumbing;
|
||||
pub mod values;
|
||||
|
||||
pub fn describe_as_module(def_id: impl Into<LocalDefId>, tcx: TyCtxt<'_>) -> String {
|
||||
let def_id = def_id.into();
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ edition = "2024"
|
|||
[dependencies]
|
||||
# tidy-alphabetical-start
|
||||
measureme = "12.0.1"
|
||||
rustc_abi = { path = "../rustc_abi" }
|
||||
rustc_data_structures = { path = "../rustc_data_structures" }
|
||||
rustc_errors = { path = "../rustc_errors" }
|
||||
rustc_hashes = { path = "../rustc_hashes" }
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ use rustc_middle::queries::{
|
|||
use rustc_middle::query::AsLocalKey;
|
||||
use rustc_middle::query::on_disk_cache::{CacheEncoder, EncodedDepNodeIndex, OnDiskCache};
|
||||
use rustc_middle::query::plumbing::{HashResult, QuerySystem, QuerySystemFns, QueryVTable};
|
||||
use rustc_middle::query::values::Value;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_query_system::dep_graph::SerializedDepNodeIndex;
|
||||
use rustc_query_system::query::{
|
||||
|
|
@ -32,6 +31,7 @@ pub use crate::plumbing::{QueryCtxt, query_key_hash_verify_all};
|
|||
use crate::plumbing::{encode_all_query_results, try_mark_green};
|
||||
use crate::profiling_support::QueryKeyStringCache;
|
||||
pub use crate::profiling_support::alloc_self_profile_query_strings;
|
||||
use crate::values::Value;
|
||||
|
||||
mod error;
|
||||
mod execution;
|
||||
|
|
@ -39,6 +39,7 @@ mod job;
|
|||
#[macro_use]
|
||||
mod plumbing;
|
||||
mod profiling_support;
|
||||
mod values;
|
||||
|
||||
#[derive(ConstParamTy)] // Allow this struct to be used for const-generic values.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
|
|
|
|||
|
|
@ -7,15 +7,15 @@ use rustc_errors::codes::*;
|
|||
use rustc_errors::{Applicability, MultiSpan, pluralize, struct_span_code_err};
|
||||
use rustc_hir as hir;
|
||||
use rustc_hir::def::{DefKind, Res};
|
||||
use rustc_middle::dep_graph::dep_kinds;
|
||||
use rustc_middle::query::plumbing::CyclePlaceholder;
|
||||
use rustc_middle::ty::{self, Representability, Ty, TyCtxt};
|
||||
use rustc_middle::{bug, span_bug};
|
||||
use rustc_query_system::query::{CycleError, report_cycle};
|
||||
use rustc_span::def_id::LocalDefId;
|
||||
use rustc_span::{ErrorGuaranteed, Span};
|
||||
|
||||
use crate::dep_graph::dep_kinds;
|
||||
use crate::query::plumbing::CyclePlaceholder;
|
||||
use crate::ty::{self, Representability, Ty, TyCtxt};
|
||||
|
||||
pub trait Value<'tcx>: Sized {
|
||||
pub(crate) trait Value<'tcx>: Sized {
|
||||
fn from_cycle_error(tcx: TyCtxt<'tcx>, cycle_error: &CycleError, guar: ErrorGuaranteed)
|
||||
-> Self;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue