diff options
| author | Michael Goulet <michael@errs.io> | 2023-08-27 21:32:55 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-08-27 22:03:00 +0000 |
| commit | e7b3c94b0e891e90f3ac1a0bb8ccc8346156afb6 (patch) | |
| tree | 6246c3a4a73660e80bf25cf889f03b507a156e5d /compiler/rustc_query_impl/src | |
| parent | 668bf8c5932933255ba278f50fdbe308f7abe60f (diff) | |
| download | rust-e7b3c94b0e891e90f3ac1a0bb8ccc8346156afb6.tar.gz rust-e7b3c94b0e891e90f3ac1a0bb8ccc8346156afb6.zip | |
Pass ErrorGuaranteed to cycle error
Diffstat (limited to 'compiler/rustc_query_impl/src')
| -rw-r--r-- | compiler/rustc_query_impl/src/lib.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_query_impl/src/plumbing.rs | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/compiler/rustc_query_impl/src/lib.rs b/compiler/rustc_query_impl/src/lib.rs index 775870106b1..9a0fcbb37a7 100644 --- a/compiler/rustc_query_impl/src/lib.rs +++ b/compiler/rustc_query_impl/src/lib.rs @@ -41,7 +41,7 @@ use rustc_query_system::query::{ }; use rustc_query_system::HandleCycleError; use rustc_query_system::Value; -use rustc_span::Span; +use rustc_span::{ErrorGuaranteed, Span}; #[macro_use] mod plumbing; @@ -146,8 +146,9 @@ where self, tcx: TyCtxt<'tcx>, cycle: &[QueryInfo<DepKind>], + guar: ErrorGuaranteed, ) -> Self::Value { - (self.dynamic.value_from_cycle_error)(tcx, cycle) + (self.dynamic.value_from_cycle_error)(tcx, cycle, guar) } #[inline(always)] diff --git a/compiler/rustc_query_impl/src/plumbing.rs b/compiler/rustc_query_impl/src/plumbing.rs index def6ac280b8..a30ea7c1ddc 100644 --- a/compiler/rustc_query_impl/src/plumbing.rs +++ b/compiler/rustc_query_impl/src/plumbing.rs @@ -605,8 +605,8 @@ macro_rules! define_queries { } { |_tcx, _key, _prev_index, _index| None }), - value_from_cycle_error: |tcx, cycle| { - let result: queries::$name::Value<'tcx> = Value::from_cycle_error(tcx, cycle); + value_from_cycle_error: |tcx, cycle, guar| { + let result: queries::$name::Value<'tcx> = Value::from_cycle_error(tcx, cycle, guar); erase(result) }, loadable_from_disk: |_tcx, _key, _index| { |
