mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
18 lines
818 B
Plaintext
18 lines
818 B
Plaintext
warning: creating a shared reference to mutable static is discouraged
|
|
--> $DIR/issue-39367.rs:22:13
|
|
|
|
|
LL | / ONCE.call_once(|| {
|
|
LL | |
|
|
LL | | DATA = transmute
|
|
LL | | ::<Box<ArenaSet<Vec<u8>>>, *const ArenaSet<Vec<u8>>>
|
|
LL | | (Box::new(__static_ref_initialize()));
|
|
LL | | });
|
|
| |______________^ 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: 1 warning emitted
|
|
|