projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b55dc8
)
rust: macros: fix documentation of the paste! macro
author
Paolo Bonzini
<pbonzini@redhat.com>
Sat, 19 Oct 2024 07:22:08 +0000
(09:22 +0200)
committer
Miguel Ojeda
<ojeda@kernel.org>
Mon, 21 Oct 2024 18:35:53 +0000
(20:35 +0200)
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 <pbonzini@redhat.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
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 <ojeda@kernel.org>
rust/macros/lib.rs
patch
|
blob
|
history
diff --git
a/rust/macros/lib.rs
b/rust/macros/lib.rs
index
8d4ac91
..
939ae00
100644
(file)
--- 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>] }
)+
/// }
/// };
/// }