$(
[$($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,
::CAN_RECONSTRUCT_QUERY_KEY;
})*
- // struct args
- $({
-
- return <( $($struct_arg_ty,)* ) as DepNodeParams>
- ::CAN_RECONSTRUCT_QUERY_KEY;
- })*
-
true
}
)*
return true;
})*
- // struct args
- $({
- $(erase!($struct_arg_name);)*
- return true;
- })*
-
false
}
)*
pub enum DepConstructor<$tcx> {
$(
$variant $(( $tuple_arg_ty ))*
- $({ $($struct_arg_name : $struct_arg_ty),* })*
),*
}
match dep {
$(
DepConstructor :: $variant $(( replace!(($tuple_arg_ty) with arg) ))*
- $({ $($struct_arg_name),* })*
=>
{
// tuple args
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,