You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following warning messages have been observed when I build this project:
warning: creating a shared reference to mutable static is discouraged
--> src/audio.rs:89:17
|
89 | TX_BUFFER.initialize_all_copied(0);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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
= note: `#[warn(static_mut_refs)]` on by default
warning: creating a shared reference to mutable static is discouraged
--> src/audio.rs:90:34
|
90 | let (ptr, len) = TX_BUFFER.get_ptr_len();
| ^^^^^^^^^^^^^^^^^^^^^^^ 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
from discord discussion:
Corvus Prudens says:
This will probably take a little time to be resolved in the general ecosystem
really what we need as a direct replacement is SyncUnsafeCell, but that's currently unstable
(of course, for full safety, we have many options that introduce a bit of runtime checking like embedded mutexes)
The text was updated successfully, but these errors were encountered:
Dicklessgreat
changed the title
suppress "creating a shared reference to mutable static is discouraged"
suppress "creating a shared reference to mutable static is discouraged" warnings
Dec 19, 2024
The following warning messages have been observed when I build this project:
from discord discussion:
Corvus Prudens says:
This will probably take a little time to be resolved in the general ecosystem
really what we need as a direct replacement is
SyncUnsafeCell
, but that's currently unstable(of course, for full safety, we have many options that introduce a bit of runtime checking like embedded mutexes)
The text was updated successfully, but these errors were encountered: