mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Move ActiveJobGuard definition next to its impls.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user