diff options
| author | Gary Guo <[email protected]> | 2023-04-08 12:25:23 +0000 |
|---|---|---|
| committer | Miguel Ojeda <[email protected]> | 2023-04-12 16:41:05 +0000 |
| commit | 70a21e54a42232f1056db7f05a194f56e03e7d3e (patch) | |
| tree | 3391cd0d005c348feeff5c19c1560a85ea6fccef /rust/macros/lib.rs | |
| parent | rust: enable the `pin_macro` feature (diff) | |
| download | kernel-70a21e54a42232f1056db7f05a194f56e03e7d3e.tar.gz kernel-70a21e54a42232f1056db7f05a194f56e03e7d3e.zip | |
rust: macros: add `quote!` macro
Add the `quote!` macro for creating `TokenStream`s directly via the
given Rust tokens. It also supports repetitions using iterators.
It will be used by the pin-init API proc-macros to generate code.
Signed-off-by: Gary Guo <[email protected]>
Signed-off-by: Benno Lossin <[email protected]>
Reviewed-by: Andreas Hindborg <[email protected]>
Reviewed-by: Alice Ryhl <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'rust/macros/lib.rs')
| -rw-r--r-- | rust/macros/lib.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/rust/macros/lib.rs b/rust/macros/lib.rs index c1d385e345b9..82b520f024dd 100644 --- a/rust/macros/lib.rs +++ b/rust/macros/lib.rs @@ -2,6 +2,8 @@ //! Crate for all kernel procedural macros. +#[macro_use] +mod quote; mod concat_idents; mod helpers; mod module; |
