Commit 15541c92 authored by Paolo Bonzini's avatar Paolo Bonzini Committed by Miguel Ojeda
Browse files

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: default avatarPaolo Bonzini <pbonzini@redhat.com>
Reviewed-by: default avatarAlice Ryhl <aliceryhl@google.com>
Fixes: 823d4737 ("rust: macros: add `paste!` proc macro")
Link: https://lore.kernel.org/r/20241019072208.1016707-1-pbonzini@redhat.com


Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
parent 8b55dc86
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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>] })+
///         }
///     };
/// }