From 0332b34aa291c130974ff16bc7bc17ff96f04b88 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Wed, 9 Dec 2020 21:47:45 +0100 Subject: [PATCH] Add a doc alias example --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 19fa99b..ea15be5 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,8 @@ macro_rules! method_new { ($ret:ident) => { paste! { #[doc = "Create a new `" $ret "` object."] + // This will generate a doc alias over "Paste_new". + #[doc(alias = $ret _new)] pub fn new() -> $ret { todo!() } } };