Skip to content

Commit d1c8430

Browse files
committed
Derive Default for query structs
1 parent 3b26d71 commit d1c8430

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

compiler/rustc_query_impl/src/plumbing.rs

+1-9
Original file line numberDiff line numberDiff line change
@@ -462,18 +462,10 @@ macro_rules! define_queries {
462462
use std::marker::PhantomData;
463463

464464
$(
465-
#[derive(Copy, Clone)]
465+
#[derive(Copy, Clone, Default)]
466466
pub struct $name<'tcx> {
467467
data: PhantomData<&'tcx ()>
468468
}
469-
470-
impl Default for $name<'_> {
471-
fn default() -> Self {
472-
Self {
473-
data: PhantomData,
474-
}
475-
}
476-
}
477469
)*
478470
}
479471

0 commit comments

Comments
 (0)