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

Use unsafe extern block for Rust 2024 #256

Open
yutannihilation opened this issue Oct 5, 2024 · 0 comments
Open

Use unsafe extern block for Rust 2024 #256

yutannihilation opened this issue Oct 5, 2024 · 0 comments

Comments

@yutannihilation
Copy link
Contributor

This is a bit too early to worry about, but it seems Rust 2024 is going to require an explicit unsafe on every extern block.

https://doc.rust-lang.org/nightly/edition-guide/rust-2024/unsafe-extern.html

However, unsafe extern is a very new syntax, which will be available only after Rust 1.82. So, it would be a headache to support both the 2021 edition and the 2024 edition (I'll probably use rustversion to switch the implementations).

You can follow the discussion on bindgen's side here:

rust-lang/rust-bindgen#2901

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

No branches or pull requests

1 participant