diff options
| author | Ralf Jung <post@ralfj.de> | 2025-01-15 08:39:35 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-15 08:39:35 +0000 |
| commit | 5460fbe610cacae6de98a3dfc3ffe9573f0c9906 (patch) | |
| tree | 96bea23fabeb42d05f67dbb77d59f152a7e9f18d /compiler/rustc_query_impl/src | |
| parent | d40f2f77bf372b0ce5fc16000c6ec1b95bd654c0 (diff) | |
| parent | 0930bfe6d29a2c9b5b71219ff4c946b732d3f3c7 (diff) | |
| download | rust-5460fbe610cacae6de98a3dfc3ffe9573f0c9906.tar.gz rust-5460fbe610cacae6de98a3dfc3ffe9573f0c9906.zip | |
Merge pull request #4139 from rust-lang/rustup-2025-01-15
Automatic Rustup
Diffstat (limited to 'compiler/rustc_query_impl/src')
| -rw-r--r-- | compiler/rustc_query_impl/src/plumbing.rs | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/compiler/rustc_query_impl/src/plumbing.rs b/compiler/rustc_query_impl/src/plumbing.rs index 1b12af62ea5..46ec538735a 100644 --- a/compiler/rustc_query_impl/src/plumbing.rs +++ b/compiler/rustc_query_impl/src/plumbing.rs @@ -27,7 +27,7 @@ use rustc_query_system::query::{ QueryCache, QueryConfig, QueryContext, QueryJobId, QueryMap, QuerySideEffects, QueryStackFrame, force_query, }; -use rustc_query_system::{LayoutOfDepth, QueryOverflow}; +use rustc_query_system::{QueryOverflow, QueryOverflowNote}; use rustc_serialize::{Decodable, Encodable}; use rustc_session::Limit; use rustc_span::def_id::LOCAL_CRATE; @@ -153,14 +153,7 @@ impl QueryContext for QueryCtxt<'_> { } fn depth_limit_error(self, job: QueryJobId) { - let mut span = None; - let mut layout_of_depth = None; - if let Some((info, depth)) = - job.try_find_layout_root(self.collect_active_jobs(), dep_kinds::layout_of) - { - span = Some(info.job.span); - layout_of_depth = Some(LayoutOfDepth { desc: info.query.description, depth }); - } + let (info, depth) = job.find_dep_kind_root(self.collect_active_jobs()); let suggested_limit = match self.recursion_limit() { Limit(0) => Limit(2), @@ -168,8 +161,8 @@ impl QueryContext for QueryCtxt<'_> { }; self.sess.dcx().emit_fatal(QueryOverflow { - span, - layout_of_depth, + span: info.job.span, + note: QueryOverflowNote { desc: info.query.description, depth }, suggested_limit, crate_name: self.crate_name(LOCAL_CRATE), }); |
