From 8f27579c7f9f512f8f364261c1272ee703b4e059 Mon Sep 17 00:00:00 2001 From: Riccardo Casatta Date: Fri, 25 Jun 2021 09:56:40 +0200 Subject: [PATCH] fix documentation referencing macro var --- src/util/taproot.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/util/taproot.rs b/src/util/taproot.rs index 6ad19251..472edb08 100644 --- a/src/util/taproot.rs +++ b/src/util/taproot.rs @@ -47,7 +47,13 @@ const MIDSTATE_TAPSIGHASH: [u8; 32] = [ /// Internal macro to speficy the different taproot tagged hashes. macro_rules! sha256t_hash_newtype { ($newtype:ident, $tag:ident, $midstate:ident, $midstate_len:expr, $docs:meta, $reverse: expr) => { - /// The tag used for [$newtype]. + sha256t_hash_newtype!($newtype, $tag, $midstate, $midstate_len, $docs, $reverse, stringify!($newtype)); + }; + + ($newtype:ident, $tag:ident, $midstate:ident, $midstate_len:expr, $docs:meta, $reverse: expr, $sname:expr) => { + #[doc = "The tag used for ["] + #[doc = $sname] + #[doc = "]"] pub struct $tag; impl sha256t::Tag for $tag {