diff options
| author | Michael Goulet <michael@errs.io> | 2025-01-16 18:37:45 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-01-16 19:12:22 +0000 |
| commit | be56f10a694d4a34c9d02b90f44788040b325a8a (patch) | |
| tree | ef1a912ec301465f429f046583dab87fb92d66ff /compiler/rustc_query_system | |
| parent | d8a64098c9d0fb25699f657c6efff0bb418f7e18 (diff) | |
| download | rust-be56f10a694d4a34c9d02b90f44788040b325a8a.tar.gz rust-be56f10a694d4a34c9d02b90f44788040b325a8a.zip | |
Properly note when query stack is being cut off
Diffstat (limited to 'compiler/rustc_query_system')
| -rw-r--r-- | compiler/rustc_query_system/src/query/job.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_query_system/src/query/job.rs b/compiler/rustc_query_system/src/query/job.rs index 3e179c61f39..a8c2aa98cd0 100644 --- a/compiler/rustc_query_system/src/query/job.rs +++ b/compiler/rustc_query_system/src/query/job.rs @@ -567,7 +567,7 @@ pub fn print_query_stack<Qcx: QueryContext>( qcx: Qcx, mut current_query: Option<QueryJobId>, dcx: DiagCtxtHandle<'_>, - num_frames: Option<usize>, + limit_frames: Option<usize>, mut file: Option<std::fs::File>, ) -> usize { // Be careful relying on global state here: this code is called from @@ -584,7 +584,7 @@ pub fn print_query_stack<Qcx: QueryContext>( let Some(query_info) = query_map.get(&query) else { break; }; - if Some(count_printed) < num_frames || num_frames.is_none() { + if Some(count_printed) < limit_frames || limit_frames.is_none() { // Only print to stderr as many stack frames as `num_frames` when present. // FIXME: needs translation #[allow(rustc::diagnostic_outside_of_impl)] @@ -615,5 +615,5 @@ pub fn print_query_stack<Qcx: QueryContext>( if let Some(ref mut file) = file { let _ = writeln!(file, "end of query stack"); } - count_printed + count_total } |
