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
{{ message }}
This repository was archived by the owner on May 28, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: src/test/ui/consts/issue-51559.stderr
+6-5Lines changed: 6 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,12 @@
1
-
error[E0080]: it is undefined behavior to use this value
2
-
--> $DIR/issue-51559.rs:4:1
1
+
error: any use of this value will cause an error
2
+
--> $DIR/issue-51559.rs:4:33
3
3
|
4
4
LL | pub const FOO: usize = unsafe { BAR as usize };
5
-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a pointer, but expected initialized plain (non-pointer) bytes
5
+
| --------------------------------^^^^^^^^^^^^---
6
+
| |
7
+
| "pointer-to-integer cast" needs an rfc before being allowed inside constants
6
8
|
7
-
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rust compiler repository if you believe it should not be considered undefined behavior
9
+
= note: `#[deny(const_err)]` on by default
8
10
9
11
error: aborting due to previous error
10
12
11
-
For more information about this error, try `rustc --explain E0080`.
0 commit comments