about summary refs log tree commit diff
path: root/compiler/rustc_query_impl/src
diff options
context:
space:
mode:
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2023-02-26 23:45:29 +0100
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2023-02-26 23:45:29 +0100
commitd1c8430a34c01a5db8d5339b8a9cffa8a41002be (patch)
tree5a4062dccd000342fb1505fb451f8e7fa345f056 /compiler/rustc_query_impl/src
parent3b26d71e04fd61deb42656b28371e097ab35c4aa (diff)
downloadrust-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.rs10
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,
-                        }
-                    }
-                }
             )*
         }