diff options
| author | Paolo Bonzini <[email protected]> | 2024-10-19 07:22:08 +0000 |
|---|---|---|
| committer | Miguel Ojeda <[email protected]> | 2024-10-21 18:35:53 +0000 |
| commit | 15541c9263ce34ff95a06bc68f45d9bc5c990bcd (patch) | |
| tree | 47751a91ccfb5984bf1bd74f791fcc30abfc01e0 /rust/macros | |
| parent | rust: kernel: fix THIS_MODULE header path in ThisModule doc comment (diff) | |
| download | kernel-15541c9263ce34ff95a06bc68f45d9bc5c990bcd.tar.gz kernel-15541c9263ce34ff95a06bc68f45d9bc5c990bcd.zip | |
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 <[email protected]>
Reviewed-by: Alice Ryhl <[email protected]>
Fixes: 823d4737d4c2 ("rust: macros: add `paste!` proc macro")
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'rust/macros')
| -rw-r--r-- | rust/macros/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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>] })+ /// } /// }; /// } |
