1
Fork 0

Inline Query::default()

This commit is contained in:
bjorn3 2024-06-30 19:40:54 +00:00
parent ec2d1b0ed2
commit f27645927c

View file

@ -65,12 +65,6 @@ impl<'a, 'tcx> QueryResult<'a, &'tcx GlobalCtxt<'tcx>> {
}
}
impl<T> Default for Query<T> {
fn default() -> Self {
Query { result: RefCell::new(None) }
}
}
pub struct Queries<'tcx> {
compiler: &'tcx Compiler,
gcx_cell: OnceLock<GlobalCtxt<'tcx>>,
@ -90,8 +84,8 @@ impl<'tcx> Queries<'tcx> {
gcx_cell: OnceLock::new(),
arena: WorkerLocal::new(|_| Arena::default()),
hir_arena: WorkerLocal::new(|_| rustc_hir::Arena::default()),
parse: Default::default(),
gcx: Default::default(),
parse: Query { result: RefCell::new(None) },
gcx: Query { result: RefCell::new(None) },
}
}