Skip to content

Commit

Permalink
Inline Query::default()
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed Jul 1, 2024
1 parent ec2d1b0 commit f276459
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions compiler/rustc_interface/src/queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>>,
Expand All @@ -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) },
}
}

Expand Down

0 comments on commit f276459

Please sign in to comment.