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

Fix compilation warnings for shared reference to mutable static #661

Open
lionel- opened this issue Jan 8, 2025 · 0 comments
Open

Fix compilation warnings for shared reference to mutable static #661

lionel- opened this issue Jan 8, 2025 · 0 comments

Comments

@lionel-
Copy link
Contributor

lionel- commented Jan 8, 2025

With recent versions of stable Rust, we now get a bunch of compilation warnings like:

warning: creating a shared reference to mutable static is discouraged
    --> crates/ark/src/interface.rs:1953:31
     |
1953 |             unsafe { Rf_error(ERROR_BUF.as_ref().unwrap().as_ptr()) };
     |                               ^^^^^^^^^^^^^^^^^^ shared reference to mutable static
     |
     = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
     = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives
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