macro_rules! declare_controlled_impl { ($name:ident, $gate_type:ty, $arg:ident) => { ... }; ($name:ident, $gate_type:ty $(, $arg:ident)*) => { ... }; ($name:ident, $gate_type:ty, cost=$cost:expr, $arg:ident) => { ... }; ($name:ident, $gate_type:ty, cost=$cost:expr $(, $arg:ident)*) => { ... }; }