Skip to content
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

Macro syn rewrite #1073

Draft
wants to merge 27 commits into
base: rust-next
Choose a base branch
from
Draft
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
y86-dev Apr 1, 2024
ed6e1a8
rust: macros: replace `quote!` with `quote::quote` and use `proc-macro2`
y86-dev Apr 6, 2024
8938c4f
rust: macros: rewrite `#[vtable]` using `syn`
y86-dev Apr 6, 2024
638dc79
rust: macros: rewrite `module!` using `syn`
y86-dev Apr 6, 2024
bdb4cff
rust: macros: rewrite `Zeroable` derive macro using `syn`
y86-dev Apr 6, 2024
2a88e8a
rust: macros: rewrite `#[pin_data]` using `syn`
y86-dev Apr 6, 2024
b8459ad
rust: macros: rewrite `#[pinned_drop]` using `syn`
y86-dev Apr 5, 2024
5d4eb2d
rust: macros: rewrite `__internal_init!` using `syn`
y86-dev Apr 6, 2024
a8dae43
rust: macros: remove helpers
y86-dev Apr 6, 2024
45d057b
rust: init: remove macros.rs
y86-dev Apr 8, 2024
c7790b6
fixup! rust: macros: rewrite `#[pin_data]` using `syn`
y86-dev Apr 16, 2024
66b9b59
fixup! rust: macros: rewrite `#[pinned_drop]` using `syn`
y86-dev Apr 16, 2024
8d21a65
fixup! rust: macros: rewrite `__internal_init!` using `syn`
y86-dev Apr 16, 2024
edd1ce0
fixup! rust: macros: rewrite `Zeroable` derive macro using `syn`
y86-dev Apr 16, 2024
6ad858d
fixup! rust: macros: rewrite `#[vtable]` using `syn`
y86-dev 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
4 changes: 2 additions & 2 deletions rust/proc-macro2/fallback.rs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to make it as a feature for upstream syn?

Original file line number Diff line number Diff line change
Expand Up @@ -826,11 +826,11 @@ impl Ident {
}

pub(crate) fn is_ident_start(c: char) -> bool {
c == '_' || unicode_ident::is_xid_start(c)
c == '_' || c.is_ascii_alphabetic()
}

pub(crate) fn is_ident_continue(c: char) -> bool {
unicode_ident::is_xid_continue(c)
c == '_' || c.is_ascii_alphanumeric()
}

#[track_caller]
Expand Down