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:13:23 +0000 |
commit | 20431706a863f92cb37dc512fef6e48d192aaf2c (patch) | |
tree | 2867f13f5fd5437ba628c67d7f87309ccadcd286 /compiler/rustc_query_system/src/query/plumbing.rs | |
parent | Releasing progress-linux version 1.65.0+dfsg1-2~progress7.99u1. (diff) | |
download | rustc-20431706a863f92cb37dc512fef6e48d192aaf2c.tar.xz rustc-20431706a863f92cb37dc512fef6e48d192aaf2c.zip |
Merging upstream version 1.66.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-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) } } } |