]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
rust: add example for `alias` argument in `module` macro documentation
authorAswin Unnikrishnan <aswinunni01@gmail.com>
Sun, 12 May 2024 11:23:20 +0000 (11:23 +0000)
committerMiguel Ojeda <ojeda@kernel.org>
Mon, 8 Jul 2024 20:20:08 +0000 (22:20 +0200)
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>
rust/macros/lib.rs

index 520eae5fd792810069d8018d922f6c56c0bcc101..aa89b41fa10e672306be16b0c412c7a615447910 100644 (file)
@@ -35,6 +35,7 @@ use proc_macro::TokenStream;
 ///     author: "Rust for Linux Contributors",
 ///     description: "My very own kernel module!",
 ///     license: "GPL",
+///     alias: ["alternate_module_name"],
 /// }
 ///
 /// struct MyModule;