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: src/test/ui/consts/miri_unleashed/const_refers_to_static.stderr
+41-4
Original file line number
Diff line number
Diff line change
@@ -7,25 +7,25 @@ LL | unsafe { &*(&FOO as *const _ as *const usize) }
7
7
warning: skipping const checks
8
8
--> $DIR/const_refers_to_static.rs:17:5
9
9
|
10
-
LL | FOO.fetch_add(1, Ordering::Relaxed) // FIXME: this should error
10
+
LL | FOO.fetch_add(1, Ordering::Relaxed)
11
11
| ^^^
12
12
13
13
warning: skipping const checks
14
14
--> $DIR/const_refers_to_static.rs:17:5
15
15
|
16
-
LL | FOO.fetch_add(1, Ordering::Relaxed) // FIXME: this should error
16
+
LL | FOO.fetch_add(1, Ordering::Relaxed)
17
17
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18
18
19
19
warning: skipping const checks
20
20
--> $DIR/const_refers_to_static.rs:24:17
21
21
|
22
-
LL | unsafe { *(&FOO as *const _ as *const usize) } // FIXME: this should error
22
+
LL | unsafe { *(&FOO as *const _ as *const usize) }
23
23
| ^^^
24
24
25
25
warning: skipping const checks
26
26
--> $DIR/const_refers_to_static.rs:29:27
27
27
|
28
-
LL | const BAD: u32 = unsafe { MUTABLE }; // FIXME: this should error
28
+
LL | const BAD: u32 = unsafe { MUTABLE };
29
29
| ^^^^^^^
30
30
31
31
warning: skipping const checks
@@ -46,6 +46,43 @@ LL | | };
46
46
|
47
47
= 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.
48
48
49
+
warning: any use of this value will cause an error
0 commit comments