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
this type already provides "interior mutability", so its binding doesn't need to be declared as mutable
849
+
845
850
lint_static_mut_refs_lint = creating a {$shared_label}reference to mutable static
846
851
.label = {$shared_label}reference to mutable static
847
852
.suggestion = use `&raw const` instead to create a raw pointer
848
853
.suggestion_mut = use `&raw mut` instead to create a raw pointer
849
854
.shared_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
850
855
.mut_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
851
-
852
856
lint_supertrait_as_deref_target = this `Deref` implementation is covered by an implicit supertrait coercion
853
857
.label = `{$self_ty}` implements `Deref<Target = dyn {$target_principal}>` which conflicts with supertrait `{$supertrait_principal}`
854
858
.label2 = target type is a supertrait of `{$self_ty}`
Copy file name to clipboardExpand all lines: tests/ui/issues/issue-39367.stderr
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,13 @@ LL | | });
11
11
|
12
12
= note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
13
13
= 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
14
+
= help: use a type that relies on "interior mutability" instead; to read more on this, visit <https://doc.rust-lang.org/reference/interior-mutability.html>
14
15
= note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default
16
+
help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable
LL | let _lock = unsafe { STDINOUT_MUTEX.lock().unwrap() };
5
+
| ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
6
+
|
7
+
= note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2024/static-mut-references.html>
8
+
= 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
9
+
= help: use a type that relies on "interior mutability" instead; to read more on this, visit <https://doc.rust-lang.org/reference/interior-mutability.html>
10
+
= note: `#[deny(static_mut_refs)]` (part of `#[deny(rust_2024_compatibility)]`) on by default
11
+
help: this type already provides "interior mutability", so its binding doesn't need to be declared as mutable
0 commit comments