From: Paolo Bonzini Date: Sat, 19 Oct 2024 07:22:08 +0000 (+0200) Subject: rust: macros: fix documentation of the paste! macro X-Git-Tag: microblaze-v6.16~535^2~14 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=15541c9263ce34ff95a06bc68f45d9bc5c990bcd;p=linux-2.6-microblaze.git rust: macros: fix documentation of the paste! macro One of the example in this section uses a curious mix of the constant and function declaration syntaxes; fix it. Signed-off-by: Paolo Bonzini Reviewed-by: Alice Ryhl Fixes: 823d4737d4c2 ("rust: macros: add `paste!` proc macro") Link: https://lore.kernel.org/r/20241019072208.1016707-1-pbonzini@redhat.com Signed-off-by: Miguel Ojeda --- diff --git a/rust/macros/lib.rs b/rust/macros/lib.rs index 8d4ac914b48b..939ae00b723a 100644 --- a/rust/macros/lib.rs +++ b/rust/macros/lib.rs @@ -359,7 +359,7 @@ pub fn pinned_drop(args: TokenStream, input: TokenStream) -> TokenStream { /// macro_rules! pub_no_prefix { /// ($prefix:ident, $($newname:ident),+) => { /// kernel::macros::paste! { -/// $(pub(crate) const fn [<$newname:lower:span>]: u32 = [<$prefix $newname:span>];)+ +/// $(pub(crate) const fn [<$newname:lower:span>]() -> u32 { [<$prefix $newname:span>] })+ /// } /// }; /// }