Derive Default for query structs
This commit is contained in:
parent
3b26d71e04
commit
d1c8430a34
1 changed files with 1 additions and 9 deletions
|
@ -462,18 +462,10 @@ macro_rules! define_queries {
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
|
|
||||||
$(
|
$(
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone, Default)]
|
||||||
pub struct $name<'tcx> {
|
pub struct $name<'tcx> {
|
||||||
data: PhantomData<&'tcx ()>
|
data: PhantomData<&'tcx ()>
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for $name<'_> {
|
|
||||||
fn default() -> Self {
|
|
||||||
Self {
|
|
||||||
data: PhantomData,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)*
|
)*
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue