From e41bf75d1e3f6f2234da78fac4e0d39d85dff544 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Fri, 6 Mar 2026 17:25:52 +1100 Subject: [PATCH] Move `ActiveJobGuard` definition next to its impls. --- compiler/rustc_query_impl/src/execution.rs | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/compiler/rustc_query_impl/src/execution.rs b/compiler/rustc_query_impl/src/execution.rs index 11749f3fb82d..ba27cd5dd030 100644 --- a/compiler/rustc_query_impl/src/execution.rs +++ b/compiler/rustc_query_impl/src/execution.rs @@ -104,20 +104,6 @@ pub(crate) fn gather_active_jobs<'tcx, C>( Some(()) } -/// Guard object representing the responsibility to execute a query job and -/// mark it as completed. -/// -/// This will poison the relevant query key if it is dropped without calling -/// [`Self::complete`]. -struct ActiveJobGuard<'tcx, K> -where - K: Eq + Hash + Copy, -{ - state: &'tcx QueryState<'tcx, K>, - key: K, - key_hash: u64, -} - #[cold] #[inline(never)] fn mk_cycle<'tcx, C: QueryCache>( @@ -148,6 +134,20 @@ fn mk_cycle<'tcx, C: QueryCache>( } } +/// Guard object representing the responsibility to execute a query job and +/// mark it as completed. +/// +/// This will poison the relevant query key if it is dropped without calling +/// [`Self::complete`]. +struct ActiveJobGuard<'tcx, K> +where + K: Eq + Hash + Copy, +{ + state: &'tcx QueryState<'tcx, K>, + key: K, + key_hash: u64, +} + impl<'tcx, K> ActiveJobGuard<'tcx, K> where K: Eq + Hash + Copy,