diff options
| author | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2023-02-26 23:45:29 +0100 |
|---|---|---|
| committer | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2023-02-26 23:45:29 +0100 |
| commit | d1c8430a34c01a5db8d5339b8a9cffa8a41002be (patch) | |
| tree | 5a4062dccd000342fb1505fb451f8e7fa345f056 /compiler/rustc_query_impl/src | |
| parent | 3b26d71e04fd61deb42656b28371e097ab35c4aa (diff) | |
| download | rust-d1c8430a34c01a5db8d5339b8a9cffa8a41002be.tar.gz rust-d1c8430a34c01a5db8d5339b8a9cffa8a41002be.zip | |
Derive Default for query structs
Diffstat (limited to 'compiler/rustc_query_impl/src')
| -rw-r--r-- | compiler/rustc_query_impl/src/plumbing.rs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/compiler/rustc_query_impl/src/plumbing.rs b/compiler/rustc_query_impl/src/plumbing.rs index dfe172fc3ff..005ce16dbb9 100644 --- a/compiler/rustc_query_impl/src/plumbing.rs +++ b/compiler/rustc_query_impl/src/plumbing.rs @@ -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, - } - } - } )* } |
