]> git.lizzy.rs Git - rust.git/commitdiff
Remove support for dep node structs
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>
Mon, 17 Feb 2020 17:41:21 +0000 (18:41 +0100)
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>
Wed, 19 Feb 2020 15:03:22 +0000 (16:03 +0100)
src/librustc/dep_graph/dep_node.rs

index 963f45b3f17e935ea2922f123b5698f457b5f776..216749a4930126ac2ef2a387a49dd8f26b2d2b46 100644 (file)
@@ -111,7 +111,6 @@ macro_rules! define_dep_nodes {
     $(
         [$($attrs:tt)*]
         $variant:ident $(( $tuple_arg_ty:ty $(,)? ))*
-                       $({ $($struct_arg_name:ident : $struct_arg_ty:ty),* })*
       ,)*
     ) => (
         #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash,
@@ -136,13 +135,6 @@ pub fn can_reconstruct_query_key<$tcx>(&self) -> bool {
                                     ::CAN_RECONSTRUCT_QUERY_KEY;
                             })*
 
-                            // struct args
-                            $({
-
-                                return <( $($struct_arg_ty,)* ) as DepNodeParams>
-                                    ::CAN_RECONSTRUCT_QUERY_KEY;
-                            })*
-
                             true
                         }
                     )*
@@ -176,12 +168,6 @@ pub fn has_params(&self) -> bool {
                                 return true;
                             })*
 
-                            // struct args
-                            $({
-                                $(erase!($struct_arg_name);)*
-                                return true;
-                            })*
-
                             false
                         }
                     )*
@@ -192,7 +178,6 @@ pub fn has_params(&self) -> bool {
         pub enum DepConstructor<$tcx> {
             $(
                 $variant $(( $tuple_arg_ty ))*
-                         $({ $($struct_arg_name : $struct_arg_ty),* })*
             ),*
         }
 
@@ -212,7 +197,6 @@ pub fn new<'tcx>(tcx: TyCtxt<'tcx>,
                 match dep {
                     $(
                         DepConstructor :: $variant $(( replace!(($tuple_arg_ty) with arg) ))*
-                                                   $({ $($struct_arg_name),* })*
                             =>
                         {
                             // tuple args
@@ -239,31 +223,6 @@ pub fn new<'tcx>(tcx: TyCtxt<'tcx>,
                                 return dep_node;
                             })*
 
-                            // struct args
-                            $({
-                                let tupled_args = ( $($struct_arg_name,)* );
-                                let hash = DepNodeParams::to_fingerprint(&tupled_args,
-                                                                         tcx);
-                                let dep_node = DepNode {
-                                    kind: DepKind::$variant,
-                                    hash
-                                };
-
-                                #[cfg(debug_assertions)]
-                                {
-                                    if !dep_node.kind.can_reconstruct_query_key() &&
-                                    (tcx.sess.opts.debugging_opts.incremental_info ||
-                                        tcx.sess.opts.debugging_opts.query_dep_graph)
-                                    {
-                                        tcx.dep_graph.register_dep_node_debug_str(dep_node, || {
-                                            tupled_args.to_debug_str(tcx)
-                                        });
-                                    }
-                                }
-
-                                return dep_node;
-                            })*
-
                             DepNode {
                                 kind: DepKind::$variant,
                                 hash: Fingerprint::ZERO,