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
error[E0080]: it is undefined behavior to use this value
16
-
--> $DIR/mutable_references.rs:10:1
17
-
|
18
-
LL | static FOO: &&mut u32 = &&mut 42;
19
-
| ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>: encountered mutable reference or box pointing to read-only memory
20
-
|
21
-
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
22
-
= note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
23
-
HEX_DUMP
24
-
}
25
-
26
15
error: encountered mutable pointer in final value of static
| ^^^^^^^^^^^^^^^ constructing invalid value at .x.<deref>: encountered `UnsafeCell` in read-only memory
58
-
|
59
-
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
60
-
= note: the raw bytes of the constant (size: $SIZE, align: $ALIGN) {
61
-
HEX_DUMP
62
-
}
63
-
64
42
error: encountered mutable pointer in final value of static
| ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.v: encountered `UnsafeCell` in read-only memory
20
-
|
21
-
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
22
-
= note: the raw bytes of the constant (size: 8, align: 8) {
23
-
╾ALLOC0╼ │ ╾──────╼
24
-
}
25
-
26
15
error: encountered mutable pointer in final value of static
= note: for more information, see issue #122153 <https://github.com/rust-lang/rust/issues/122153>
34
23
35
24
error[E0080]: it is undefined behavior to use this value
36
-
--> $DIR/static-no-inner-mut.rs:14:1
25
+
--> $DIR/static-no-inner-mut.rs:13:1
37
26
|
38
27
LL | static REFMUT: &mut i32 = &mut 0;
39
28
| ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered mutable reference or box pointing to read-only memory
40
29
|
41
30
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
42
31
= note: the raw bytes of the constant (size: 8, align: 8) {
43
-
╾ALLOC1╼ │ ╾──────╼
32
+
╾ALLOC0╼ │ ╾──────╼
44
33
}
45
34
46
35
error: encountered mutable pointer in final value of static
| ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>.v: encountered `UnsafeCell` in read-only memory
60
-
|
61
-
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
62
-
= note: the raw bytes of the constant (size: 8, align: 8) {
63
-
╾ALLOC2╼ │ ╾──────╼
64
-
}
65
-
66
44
error: encountered mutable pointer in final value of static
| ^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered mutable reference or box pointing to read-only memory
80
58
|
81
59
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
82
60
= note: the raw bytes of the constant (size: 8, align: 8) {
83
-
╾ALLOC3╼ │ ╾──────╼
61
+
╾ALLOC1╼ │ ╾──────╼
84
62
}
85
63
86
64
error: encountered mutable pointer in final value of static
0 commit comments