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

Remove usage of unstable proc macro features #63

Merged
merged 4 commits into from
Jan 11, 2024

Conversation

nspin
Copy link
Member

@nspin nspin commented Jan 10, 2024

Remove usage of the following unstable features:

#![feature(proc_macro_hygiene)]
#![feature(stmt_expr_attributes)]

As a consequence, we can no longer use the sel4_config::* attribute macros on statements of non-inline module declarations.

So, we replace #![sel4_config::sel4_cfg] with sel4_config::sel4_cfg_if! {} in the relevant cases, and add a new expression macro called sel4_config::sel4_cfg_wrap_match! {} to be used in place of #[sel4_config::sel4_cfg_match] until those unstable features are stabilized.

In the cases relevant to this PR, attribute macros are generally preferable over expression macros because the play more nicely with external tools like rustfmt, but, for now, we must make due with expression macros.

@nspin nspin merged commit 3d3ff7e into seL4:main Jan 11, 2024
15 checks passed
@nspin nspin deleted the pr/remove-unstable-proc-macro-features branch January 11, 2024 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant