Move ActiveJobGuard definition next to its impls.

This commit is contained in:
Nicholas Nethercote
2026-03-06 17:25:52 +11:00
parent b41f22de2a
commit e41bf75d1e
+14 -14
View File
@@ -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,