diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:11:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:12:43 +0000 |
commit | cf94bdc0742c13e2a0cac864c478b8626b266e1b (patch) | |
tree | 044670aa50cc5e2b4229aa0b6b3df6676730c0a6 /compiler/rustc_query_system/src/query/plumbing.rs | |
parent | Adding debian version 1.65.0+dfsg1-2. (diff) | |
download | rustc-cf94bdc0742c13e2a0cac864c478b8626b266e1b.tar.xz rustc-cf94bdc0742c13e2a0cac864c478b8626b266e1b.zip |
Merging upstream version 1.66.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'compiler/rustc_query_system/src/query/plumbing.rs')
-rw-r--r-- | compiler/rustc_query_system/src/query/plumbing.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/compiler/rustc_query_system/src/query/plumbing.rs b/compiler/rustc_query_system/src/query/plumbing.rs index 8179a674a..15b89daa6 100644 --- a/compiler/rustc_query_system/src/query/plumbing.rs +++ b/compiler/rustc_query_system/src/query/plumbing.rs @@ -119,7 +119,7 @@ where #[inline(never)] fn mk_cycle<CTX, V, R>( tcx: CTX, - error: CycleError, + cycle_error: CycleError, handler: HandleCycleError, cache: &dyn crate::query::QueryStorage<Value = V, Stored = R>, ) -> R @@ -128,13 +128,14 @@ where V: std::fmt::Debug + Value<CTX::DepContext>, R: Clone, { - let error = report_cycle(tcx.dep_context().sess(), error); - let value = handle_cycle_error(*tcx.dep_context(), error, handler); + let error = report_cycle(tcx.dep_context().sess(), &cycle_error); + let value = handle_cycle_error(*tcx.dep_context(), &cycle_error, error, handler); cache.store_nocache(value) } fn handle_cycle_error<CTX, V>( tcx: CTX, + cycle_error: &CycleError, mut error: DiagnosticBuilder<'_, ErrorGuaranteed>, handler: HandleCycleError, ) -> V @@ -146,7 +147,7 @@ where match handler { Error => { error.emit(); - Value::from_cycle_error(tcx) + Value::from_cycle_error(tcx, &cycle_error.cycle) } Fatal => { error.emit(); @@ -155,7 +156,7 @@ where } DelayBug => { error.delay_as_bug(); - Value::from_cycle_error(tcx) + Value::from_cycle_error(tcx, &cycle_error.cycle) } } } |