Skip to content

Commit 67f9c31

Browse files
aswinunni01ojeda
authored andcommitted
rust: add example for alias argument in module macro documentation
Add example for `alias` argument supported by `module` macro. `alias` accepts an array of alternate names for the module as string. Reviewed-by: Alice Ryhl <aliceryhl@google.com> Signed-off-by: Aswin Unnikrishnan <aswinunni01@gmail.com> Reviewed-by: Benno Lossin <benno.lossin@proton.me> Link: https://lore.kernel.org/r/20240512112324.8514-1-aswinunni01@gmail.com Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
1 parent 256abd8 commit 67f9c31

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

rust/macros/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ use proc_macro::TokenStream;
3535
/// author: "Rust for Linux Contributors",
3636
/// description: "My very own kernel module!",
3737
/// license: "GPL",
38+
/// alias: ["alternate_module_name"],
3839
/// }
3940
///
4041
/// struct MyModule;

0 commit comments

Comments
 (0)