|
| 1 | +error: creating a shared reference to mutable static is discouraged |
| 2 | + --> tests/ui/checked_unwrap/simple_conditionals.rs:175:12 |
| 3 | + | |
| 4 | +LL | if X.is_some() { |
| 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: `-D static-mut-refs` implied by `-D warnings` |
| 11 | + = help: to override `-D warnings` add `#[allow(static_mut_refs)]` |
| 12 | + |
| 13 | +error: creating a shared reference to mutable static is discouraged |
| 14 | + --> tests/ui/checked_unwrap/simple_conditionals.rs:178:13 |
| 15 | + | |
| 16 | +LL | X.unwrap(); |
| 17 | + | ^^^^^^^^^^ shared reference to mutable static |
| 18 | + | |
| 19 | + = note: for more information, see issue #114447 <https://github.com/rust-lang/rust/issues/114447> |
| 20 | + = note: this will be a hard error in the 2024 edition |
| 21 | + = 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 |
| 22 | + |
1 | 23 | error: called `unwrap` on `x` after checking its variant with `is_some`
|
2 | 24 | --> tests/ui/checked_unwrap/simple_conditionals.rs:47:9
|
3 | 25 | |
|
@@ -236,5 +258,5 @@ LL | if result.is_ok() {
|
236 | 258 | LL | result.as_mut().unwrap();
|
237 | 259 | | ^^^^^^^^^^^^^^^^^^^^^^^^
|
238 | 260 |
|
239 |
| -error: aborting due to 25 previous errors |
| 261 | +error: aborting due to 27 previous errors |
240 | 262 |
|
0 commit comments