|  | error: creating a shared reference to mutable static | 
|  | --> $DIR/static-mut-refs.rs:38:18 | 
|  | | | 
|  | LL |         let _y = &X; | 
|  | |                  ^^ shared reference to mutable static | 
|  | | | 
|  | = note: for more information, see <https://doc.rust-lang.org/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: `#[deny(static_mut_refs)]` (part of `#[deny(rust_2024_compatibility)]`) on by default | 
|  | help: use `&raw const` instead to create a raw pointer | 
|  | | | 
|  | LL |         let _y = &raw const X; | 
|  | |                   +++++++++ | 
|  |  | 
|  | error: creating a mutable reference to mutable static | 
|  | --> $DIR/static-mut-refs.rs:42:18 | 
|  | | | 
|  | LL |         let _y = &mut X; | 
|  | |                  ^^^^^^ mutable reference to mutable static | 
|  | | | 
|  | = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html> | 
|  | = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives | 
|  | help: use `&raw mut` instead to create a raw pointer | 
|  | | | 
|  | LL |         let _y = &raw mut X; | 
|  | |                   +++ | 
|  |  | 
|  | error: creating a shared reference to mutable static | 
|  | --> $DIR/static-mut-refs.rs:50:22 | 
|  | | | 
|  | LL |         let ref _a = X; | 
|  | |                      ^ shared reference to mutable static | 
|  | | | 
|  | = note: for more information, see <https://doc.rust-lang.org/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 | 
|  |  | 
|  | error: creating a shared reference to mutable static | 
|  | --> $DIR/static-mut-refs.rs:54:25 | 
|  | | | 
|  | LL |         let (_b, _c) = (&X, &Y); | 
|  | |                         ^^ shared reference to mutable static | 
|  | | | 
|  | = note: for more information, see <https://doc.rust-lang.org/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 | 
|  | help: use `&raw const` instead to create a raw pointer | 
|  | | | 
|  | LL |         let (_b, _c) = (&raw const X, &Y); | 
|  | |                          +++++++++ | 
|  |  | 
|  | error: creating a shared reference to mutable static | 
|  | --> $DIR/static-mut-refs.rs:54:29 | 
|  | | | 
|  | LL |         let (_b, _c) = (&X, &Y); | 
|  | |                             ^^ shared reference to mutable static | 
|  | | | 
|  | = note: for more information, see <https://doc.rust-lang.org/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 | 
|  | help: use `&raw const` instead to create a raw pointer | 
|  | | | 
|  | LL |         let (_b, _c) = (&X, &raw const Y); | 
|  | |                              +++++++++ | 
|  |  | 
|  | error: creating a shared reference to mutable static | 
|  | --> $DIR/static-mut-refs.rs:60:13 | 
|  | | | 
|  | LL |         foo(&X); | 
|  | |             ^^ shared reference to mutable static | 
|  | | | 
|  | = note: for more information, see <https://doc.rust-lang.org/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 | 
|  | help: use `&raw const` instead to create a raw pointer | 
|  | | | 
|  | LL |         foo(&raw const X); | 
|  | |              +++++++++ | 
|  |  | 
|  | error: creating a shared reference to mutable static | 
|  | --> $DIR/static-mut-refs.rs:66:17 | 
|  | | | 
|  | LL |         let _ = Z.len(); | 
|  | |                 ^^^^^^^ shared reference to mutable static | 
|  | | | 
|  | = note: for more information, see <https://doc.rust-lang.org/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 | 
|  |  | 
|  | error: creating a shared reference to mutable static | 
|  | --> $DIR/static-mut-refs.rs:72:33 | 
|  | | | 
|  | LL |         let _ = format!("{:?}", Z); | 
|  | |                                 ^ shared reference to mutable static | 
|  | | | 
|  | = note: for more information, see <https://doc.rust-lang.org/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 | 
|  |  | 
|  | error: creating a shared reference to mutable static | 
|  | --> $DIR/static-mut-refs.rs:76:18 | 
|  | | | 
|  | LL |         let _v = &A.value; | 
|  | |                  ^^^^^^^^ shared reference to mutable static | 
|  | | | 
|  | = note: for more information, see <https://doc.rust-lang.org/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 | 
|  | help: use `&raw const` instead to create a raw pointer | 
|  | | | 
|  | LL |         let _v = &raw const A.value; | 
|  | |                   +++++++++ | 
|  |  | 
|  | error: creating a shared reference to mutable static | 
|  | --> $DIR/static-mut-refs.rs:80:18 | 
|  | | | 
|  | LL |         let _s = &A.s.value; | 
|  | |                  ^^^^^^^^^^ shared reference to mutable static | 
|  | | | 
|  | = note: for more information, see <https://doc.rust-lang.org/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 | 
|  | help: use `&raw const` instead to create a raw pointer | 
|  | | | 
|  | LL |         let _s = &raw const A.s.value; | 
|  | |                   +++++++++ | 
|  |  | 
|  | error: creating a shared reference to mutable static | 
|  | --> $DIR/static-mut-refs.rs:84:22 | 
|  | | | 
|  | LL |         let ref _v = A.value; | 
|  | |                      ^^^^^^^ shared reference to mutable static | 
|  | | | 
|  | = note: for more information, see <https://doc.rust-lang.org/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 | 
|  |  | 
|  | error: creating a mutable reference to mutable static | 
|  | --> $DIR/static-mut-refs.rs:14:14 | 
|  | | | 
|  | LL |         &mut ($x.0) | 
|  | |              ^^^^^^ mutable reference to mutable static | 
|  | ... | 
|  | LL |         let _x = bar!(FOO); | 
|  | |                  --------- in this macro invocation | 
|  | | | 
|  | = note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html> | 
|  | = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives | 
|  | = note: this error originates in the macro `bar` (in Nightly builds, run with -Z macro-backtrace for more info) | 
|  |  | 
|  | error: aborting due to 12 previous errors | 
|  |  |