Add some comments

This commit is contained in:
John Kåre Alsaker 2025-04-29 12:04:33 +02:00
parent cff9efde74
commit 08b27ffbe8
3 changed files with 7 additions and 0 deletions

View File

@ -40,7 +40,11 @@ pub struct Compiler {
pub sess: Session,
pub codegen_backend: Box<dyn CodegenBackend>,
pub(crate) override_queries: Option<fn(&Session, &mut Providers)>,
/// A reference to the current `GlobalCtxt` which we pass on to `GlobalCtxt`.
pub(crate) current_gcx: CurrentGcx,
/// A jobserver reference which we pass on to `GlobalCtxt`.
pub(crate) jobserver_proxy: Arc<Proxy>,
}

View File

@ -1440,6 +1440,7 @@ pub struct GlobalCtxt<'tcx> {
current_gcx: CurrentGcx,
/// A jobserver reference used to release then acquire a token while waiting on a query.
pub jobserver_proxy: Arc<Proxy>,
}

View File

@ -152,6 +152,8 @@ pub enum QuerySideEffect {
pub trait QueryContext: HasDepContext {
type QueryInfo: Clone;
/// Gets a jobserver reference which is used to release then acquire
/// a token while waiting on a query.
fn jobserver_proxy(&self) -> &Proxy;
fn next_job_id(self) -> QueryJobId;