Skip to content

Macro syn rewrite #1073

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 27 commits into
base: rust-next
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
6b2262f
kbuild: rust: apply `CONFIG_WERROR` to hostprogs as well
ojeda Apr 7, 2024
a5f77c5
kbuild: rust: use shared host Rust flags for `macros`
ojeda Apr 7, 2024
e4527ff
kbuild: rust-analyzer: support key-value `cfg`s
ojeda Apr 10, 2024
c3b22c6
rust: proc-macro2: import crate
ojeda Oct 9, 2022
617c120
rust: proc-macro2: add SPDX License Identifiers
ojeda Oct 9, 2022
24954e2
rust: proc-macro2: remove `unicode_ident` dependency
ojeda Oct 9, 2022
925b30e
rust: quote: import crate
ojeda Oct 9, 2022
cdad907
rust: quote: add SPDX License Identifiers
ojeda Oct 9, 2022
328f151
rust: syn: import crate
ojeda Oct 9, 2022
cef2d41
rust: syn: add SPDX License Identifiers
ojeda Oct 9, 2022
82e9a4f
rust: syn: remove `unicode-ident` dependency
ojeda Oct 9, 2022
a59391f
rust: Kbuild: enable `proc-macro2`, `quote` and `syn`
ojeda Oct 9, 2022
1b729e1
rust: macros: fix soundness issue in `module!` macro
BennoLossin Apr 1, 2024
ed6e1a8
rust: macros: replace `quote!` with `quote::quote` and use `proc-macro2`
BennoLossin Apr 6, 2024
8938c4f
rust: macros: rewrite `#[vtable]` using `syn`
BennoLossin Apr 6, 2024
638dc79
rust: macros: rewrite `module!` using `syn`
BennoLossin Apr 6, 2024
bdb4cff
rust: macros: rewrite `Zeroable` derive macro using `syn`
BennoLossin Apr 6, 2024
2a88e8a
rust: macros: rewrite `#[pin_data]` using `syn`
BennoLossin Apr 6, 2024
b8459ad
rust: macros: rewrite `#[pinned_drop]` using `syn`
BennoLossin Apr 5, 2024
5d4eb2d
rust: macros: rewrite `__internal_init!` using `syn`
BennoLossin Apr 6, 2024
a8dae43
rust: macros: remove helpers
BennoLossin Apr 6, 2024
45d057b
rust: init: remove macros.rs
BennoLossin Apr 8, 2024
c7790b6
fixup! rust: macros: rewrite `#[pin_data]` using `syn`
BennoLossin Apr 16, 2024
66b9b59
fixup! rust: macros: rewrite `#[pinned_drop]` using `syn`
BennoLossin Apr 16, 2024
8d21a65
fixup! rust: macros: rewrite `__internal_init!` using `syn`
BennoLossin Apr 16, 2024
edd1ce0
fixup! rust: macros: rewrite `Zeroable` derive macro using `syn`
BennoLossin Apr 16, 2024
6ad858d
fixup! rust: macros: rewrite `#[vtable]` using `syn`
BennoLossin Apr 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
rust: init: remove macros.rs
Since all initialization macros have been rewritten using `syn` and
`quote`, the `macros` module does no longer contain any code.
The only thing that is left is documentation that explains the expansion
of the initialization macros. This can now be directly observed in the
source code for the macros (found under `rust/macros`). Since the proc
macro code is much more readable than the declarative macro style.
Thus remove the expanded code.

Signed-off-by: Benno Lossin <[email protected]>
  • Loading branch information
BennoLossin committed Apr 10, 2024
commit 45d057b60d216115b4c06bfd6d68f96470652ea0
2 changes: 0 additions & 2 deletions rust/kernel/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,6 @@ use core::{

#[doc(hidden)]
pub mod __internal;
#[doc(hidden)]
pub mod macros;

/// Initialize and pin a type directly on the stack.
///
Expand Down
Loading