Skip to content

Commit

Permalink
Derive Default for query structs
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoxc committed Feb 26, 2023
1 parent 3b26d71 commit d1c8430
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions compiler/rustc_query_impl/src/plumbing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -462,18 +462,10 @@ macro_rules! define_queries {
use std::marker::PhantomData;

$(
#[derive(Copy, Clone)]
#[derive(Copy, Clone, Default)]
pub struct $name<'tcx> {
data: PhantomData<&'tcx ()>
}

impl Default for $name<'_> {
fn default() -> Self {
Self {
data: PhantomData,
}
}
}
)*
}

Expand Down

0 comments on commit d1c8430

Please sign in to comment.