From cf94bdc0742c13e2a0cac864c478b8626b266e1b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:11:38 +0200 Subject: Merging upstream version 1.66.0+dfsg1. Signed-off-by: Daniel Baumann --- compiler/rustc_query_system/src/query/mod.rs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'compiler/rustc_query_system/src/query/mod.rs') diff --git a/compiler/rustc_query_system/src/query/mod.rs b/compiler/rustc_query_system/src/query/mod.rs index 0b07bb64b..118703fc0 100644 --- a/compiler/rustc_query_system/src/query/mod.rs +++ b/compiler/rustc_query_system/src/query/mod.rs @@ -14,10 +14,11 @@ pub use self::caches::{ mod config; pub use self::config::{QueryConfig, QueryDescription, QueryVTable}; -use crate::dep_graph::{DepContext, DepNodeIndex, HasDepContext, SerializedDepNodeIndex}; +use crate::dep_graph::{DepNodeIndex, HasDepContext, SerializedDepNodeIndex}; use rustc_data_structures::sync::Lock; use rustc_errors::Diagnostic; use rustc_hir::def::DefKind; +use rustc_span::def_id::DefId; use rustc_span::Span; use thin_vec::ThinVec; @@ -29,7 +30,9 @@ pub struct QueryStackFrame { pub name: &'static str, pub description: String, span: Option, - def_kind: Option, + pub def_id: Option, + pub def_kind: Option, + pub ty_adt_id: Option, /// This hash is used to deterministically pick /// a query to remove cycles in the parallel compiler. #[cfg(parallel_compiler)] @@ -42,14 +45,18 @@ impl QueryStackFrame { name: &'static str, description: String, span: Option, + def_id: Option, def_kind: Option, + ty_adt_id: Option, _hash: impl FnOnce() -> u64, ) -> Self { Self { name, description, span, + def_id, def_kind, + ty_adt_id, #[cfg(parallel_compiler)] hash: _hash(), } @@ -123,7 +130,5 @@ pub trait QueryContext: HasDepContext { compute: impl FnOnce() -> R, ) -> R; - fn depth_limit_error(&self) { - self.dep_context().sess().emit_fatal(crate::error::QueryOverflow); - } + fn depth_limit_error(&self, job: QueryJobId); } -- cgit v1.2.3