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
Copy file name to clipboardExpand all lines: tests/ui/lint/static-mut-refs.e2021.stderr
+12-12
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
warning: creating a shared reference to mutable static is discouraged
1
+
warning: creating a shared reference to mutable static is not allowed
2
2
--> $DIR/static-mut-refs.rs:38:18
3
3
|
4
4
LL | let _y = &X;
@@ -12,7 +12,7 @@ help: use `&raw const` instead to create a raw pointer
12
12
LL | let _y = &raw const X;
13
13
| +++++++++
14
14
15
-
warning: creating a mutable reference to mutable static is discouraged
15
+
warning: creating a mutable reference to mutable static is not allowed
16
16
--> $DIR/static-mut-refs.rs:42:18
17
17
|
18
18
LL | let _y = &mut X;
@@ -25,7 +25,7 @@ help: use `&raw mut` instead to create a raw pointer
25
25
LL | let _y = &raw mut X;
26
26
| +++
27
27
28
-
warning: creating a shared reference to mutable static is discouraged
28
+
warning: creating a shared reference to mutable static is not allowed
29
29
--> $DIR/static-mut-refs.rs:50:22
30
30
|
31
31
LL | let ref _a = X;
@@ -34,7 +34,7 @@ LL | let ref _a = X;
34
34
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
35
35
= 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
36
36
37
-
warning: creating a shared reference to mutable static is discouraged
37
+
warning: creating a shared reference to mutable static is not allowed
38
38
--> $DIR/static-mut-refs.rs:54:25
39
39
|
40
40
LL | let (_b, _c) = (&X, &Y);
@@ -47,7 +47,7 @@ help: use `&raw const` instead to create a raw pointer
47
47
LL | let (_b, _c) = (&raw const X, &Y);
48
48
| +++++++++
49
49
50
-
warning: creating a shared reference to mutable static is discouraged
50
+
warning: creating a shared reference to mutable static is not allowed
51
51
--> $DIR/static-mut-refs.rs:54:29
52
52
|
53
53
LL | let (_b, _c) = (&X, &Y);
@@ -60,7 +60,7 @@ help: use `&raw const` instead to create a raw pointer
60
60
LL | let (_b, _c) = (&X, &raw const Y);
61
61
| +++++++++
62
62
63
-
warning: creating a shared reference to mutable static is discouraged
63
+
warning: creating a shared reference to mutable static is not allowed
64
64
--> $DIR/static-mut-refs.rs:60:13
65
65
|
66
66
LL | foo(&X);
@@ -73,7 +73,7 @@ help: use `&raw const` instead to create a raw pointer
73
73
LL | foo(&raw const X);
74
74
| +++++++++
75
75
76
-
warning: creating a shared reference to mutable static is discouraged
76
+
warning: creating a shared reference to mutable static is not allowed
77
77
--> $DIR/static-mut-refs.rs:66:17
78
78
|
79
79
LL | let _ = Z.len();
@@ -82,7 +82,7 @@ LL | let _ = Z.len();
82
82
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
83
83
= 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
84
84
85
-
warning: creating a shared reference to mutable static is discouraged
85
+
warning: creating a shared reference to mutable static is not allowed
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
92
92
= 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
93
93
94
-
warning: creating a shared reference to mutable static is discouraged
94
+
warning: creating a shared reference to mutable static is not allowed
95
95
--> $DIR/static-mut-refs.rs:76:18
96
96
|
97
97
LL | let _v = &A.value;
@@ -104,7 +104,7 @@ help: use `&raw const` instead to create a raw pointer
104
104
LL | let _v = &raw const A.value;
105
105
| +++++++++
106
106
107
-
warning: creating a shared reference to mutable static is discouraged
107
+
warning: creating a shared reference to mutable static is not allowed
108
108
--> $DIR/static-mut-refs.rs:80:18
109
109
|
110
110
LL | let _s = &A.s.value;
@@ -117,7 +117,7 @@ help: use `&raw const` instead to create a raw pointer
117
117
LL | let _s = &raw const A.s.value;
118
118
| +++++++++
119
119
120
-
warning: creating a shared reference to mutable static is discouraged
120
+
warning: creating a shared reference to mutable static is not allowed
121
121
--> $DIR/static-mut-refs.rs:84:22
122
122
|
123
123
LL | let ref _v = A.value;
@@ -126,7 +126,7 @@ LL | let ref _v = A.value;
126
126
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
127
127
= 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
128
128
129
-
warning: creating a mutable reference to mutable static is discouraged
129
+
warning: creating a mutable reference to mutable static is not allowed
Copy file name to clipboardExpand all lines: tests/ui/lint/static-mut-refs.e2024.stderr
+12-12
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
error: creating a shared reference to mutable static is discouraged
1
+
error: creating a shared reference to mutable static is not allowed
2
2
--> $DIR/static-mut-refs.rs:38:18
3
3
|
4
4
LL | let _y = &X;
@@ -12,7 +12,7 @@ help: use `&raw const` instead to create a raw pointer
12
12
LL | let _y = &raw const X;
13
13
| +++++++++
14
14
15
-
error: creating a mutable reference to mutable static is discouraged
15
+
error: creating a mutable reference to mutable static is not allowed
16
16
--> $DIR/static-mut-refs.rs:42:18
17
17
|
18
18
LL | let _y = &mut X;
@@ -25,7 +25,7 @@ help: use `&raw mut` instead to create a raw pointer
25
25
LL | let _y = &raw mut X;
26
26
| +++
27
27
28
-
error: creating a shared reference to mutable static is discouraged
28
+
error: creating a shared reference to mutable static is not allowed
29
29
--> $DIR/static-mut-refs.rs:50:22
30
30
|
31
31
LL | let ref _a = X;
@@ -34,7 +34,7 @@ LL | let ref _a = X;
34
34
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
35
35
= 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
36
36
37
-
error: creating a shared reference to mutable static is discouraged
37
+
error: creating a shared reference to mutable static is not allowed
38
38
--> $DIR/static-mut-refs.rs:54:25
39
39
|
40
40
LL | let (_b, _c) = (&X, &Y);
@@ -47,7 +47,7 @@ help: use `&raw const` instead to create a raw pointer
47
47
LL | let (_b, _c) = (&raw const X, &Y);
48
48
| +++++++++
49
49
50
-
error: creating a shared reference to mutable static is discouraged
50
+
error: creating a shared reference to mutable static is not allowed
51
51
--> $DIR/static-mut-refs.rs:54:29
52
52
|
53
53
LL | let (_b, _c) = (&X, &Y);
@@ -60,7 +60,7 @@ help: use `&raw const` instead to create a raw pointer
60
60
LL | let (_b, _c) = (&X, &raw const Y);
61
61
| +++++++++
62
62
63
-
error: creating a shared reference to mutable static is discouraged
63
+
error: creating a shared reference to mutable static is not allowed
64
64
--> $DIR/static-mut-refs.rs:60:13
65
65
|
66
66
LL | foo(&X);
@@ -73,7 +73,7 @@ help: use `&raw const` instead to create a raw pointer
73
73
LL | foo(&raw const X);
74
74
| +++++++++
75
75
76
-
error: creating a shared reference to mutable static is discouraged
76
+
error: creating a shared reference to mutable static is not allowed
77
77
--> $DIR/static-mut-refs.rs:66:17
78
78
|
79
79
LL | let _ = Z.len();
@@ -82,7 +82,7 @@ LL | let _ = Z.len();
82
82
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
83
83
= 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
84
84
85
-
error: creating a shared reference to mutable static is discouraged
85
+
error: creating a shared reference to mutable static is not allowed
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
92
92
= 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
93
93
94
-
error: creating a shared reference to mutable static is discouraged
94
+
error: creating a shared reference to mutable static is not allowed
95
95
--> $DIR/static-mut-refs.rs:76:18
96
96
|
97
97
LL | let _v = &A.value;
@@ -104,7 +104,7 @@ help: use `&raw const` instead to create a raw pointer
104
104
LL | let _v = &raw const A.value;
105
105
| +++++++++
106
106
107
-
error: creating a shared reference to mutable static is discouraged
107
+
error: creating a shared reference to mutable static is not allowed
108
108
--> $DIR/static-mut-refs.rs:80:18
109
109
|
110
110
LL | let _s = &A.s.value;
@@ -117,7 +117,7 @@ help: use `&raw const` instead to create a raw pointer
117
117
LL | let _s = &raw const A.s.value;
118
118
| +++++++++
119
119
120
-
error: creating a shared reference to mutable static is discouraged
120
+
error: creating a shared reference to mutable static is not allowed
121
121
--> $DIR/static-mut-refs.rs:84:22
122
122
|
123
123
LL | let ref _v = A.value;
@@ -126,7 +126,7 @@ LL | let ref _v = A.value;
126
126
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
127
127
= 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
128
128
129
-
error: creating a mutable reference to mutable static is discouraged
129
+
error: creating a mutable reference to mutable static is not allowed
= 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
9
= note: `#[warn(static_mut_refs)]` on by default
10
10
11
-
warning: creating a shared reference to mutable static is discouraged
11
+
warning: creating a shared reference to mutable static is not allowed
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
18
18
= 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
19
19
20
-
warning: creating a shared reference to mutable static is discouraged
20
+
warning: creating a shared reference to mutable static is not allowed
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
27
27
= 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
28
28
29
-
warning: creating a shared reference to mutable static is discouraged
29
+
warning: creating a shared reference to mutable static is not allowed
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
36
36
= 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
37
37
38
-
warning: creating a shared reference to mutable static is discouraged
38
+
warning: creating a shared reference to mutable static is not allowed
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html>
45
45
= 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
46
46
47
-
warning: creating a shared reference to mutable static is discouraged
47
+
warning: creating a shared reference to mutable static is not allowed
48
48
--> $DIR/static-mut-xc.rs:33:18
49
49
|
50
50
LL | static_bound(&static_mut_xc::a);
@@ -57,7 +57,7 @@ help: use `&raw const` instead to create a raw pointer
57
57
LL | static_bound(&raw const static_mut_xc::a);
58
58
| +++++++++
59
59
60
-
warning: creating a mutable reference to mutable static is discouraged
60
+
warning: creating a mutable reference to mutable static is not allowed
0 commit comments