|
| 1 | +warning: creating a shared reference to mutable static is discouraged |
| 2 | + --> $DIR/order-drop-with-match.rs:16:13 |
| 3 | + | |
| 4 | +LL | ORDER[INDEX] = 1; |
| 5 | + | ^^^^^^^^^^^^ shared reference to mutable static |
| 6 | + | |
| 7 | + = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447> |
| 8 | + = note: this will be a hard error in the 2024 edition |
| 9 | + = note: this shared reference has lifetime `'static`, but if the static ever gets mutated, or a mutable reference is created, then any further use of this shared reference is Undefined Behavior |
| 10 | + = note: `#[warn(static_mut_refs)]` on by default |
| 11 | + |
| 12 | +warning: creating a shared reference to mutable static is discouraged |
| 13 | + --> $DIR/order-drop-with-match.rs:27:13 |
| 14 | + | |
| 15 | +LL | ORDER[INDEX] = 2; |
| 16 | + | ^^^^^^^^^^^^ shared reference to mutable static |
| 17 | + | |
| 18 | + = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447> |
| 19 | + = note: this will be a hard error in the 2024 edition |
| 20 | + = note: this shared reference has lifetime `'static`, but if the static ever gets mutated, or a mutable reference is created, then any further use of this shared reference is Undefined Behavior |
| 21 | + |
| 22 | +warning: creating a shared reference to mutable static is discouraged |
| 23 | + --> $DIR/order-drop-with-match.rs:38:13 |
| 24 | + | |
| 25 | +LL | ORDER[INDEX] = 3; |
| 26 | + | ^^^^^^^^^^^^ shared reference to mutable static |
| 27 | + | |
| 28 | + = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447> |
| 29 | + = note: this will be a hard error in the 2024 edition |
| 30 | + = note: this shared reference has lifetime `'static`, but if the static ever gets mutated, or a mutable reference is created, then any further use of this shared reference is Undefined Behavior |
| 31 | + |
| 32 | +warning: 3 warnings emitted |
| 33 | + |
0 commit comments