-
- Downloads
rust: macros: take string literals in `module!`
Instead of taking binary string literals, take string ones instead, making it easier for users to define a module, i.e. instead of calling `module!` like: module! { ... name: b"rust_minimal", ... } now it is called as: module! { ... name: "rust_minimal", ... } Module names, aliases and license strings are restricted to ASCII only. However, the author and the description allows UTF-8. For simplicity (avoid parsing), escape sequences and raw string literals are not yet handled. Link: https://github.com/Rust-for-Linux/linux/issues/252 Link: https://lore.kernel.org/lkml/YukvvPOOu8uZl7+n@yadro.com/ Signed-off-by:Gary Guo <gary@garyguo.net> [Reworded, adapted for upstream and applied latest changes] Signed-off-by:
Miguel Ojeda <ojeda@kernel.org>
Showing
- rust/macros/helpers.rs 18 additions, 6 deletionsrust/macros/helpers.rs
- rust/macros/lib.rs 6 additions, 6 deletionsrust/macros/lib.rs
- rust/macros/module.rs 5 additions, 5 deletionsrust/macros/module.rs
- samples/rust/rust_minimal.rs 4 additions, 4 deletionssamples/rust/rust_minimal.rs
- samples/rust/rust_print.rs 4 additions, 4 deletionssamples/rust/rust_print.rs
Loading
Please register or sign in to comment