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/const-eval/issue-52442.stderr
+3-5
Original file line number
Diff line number
Diff line change
@@ -7,13 +7,11 @@ LL | [(); { &loop { break } as *const _ as usize } ];
7
7
= note: for more information, see https://github.com/rust-lang/rust/issues/51910
8
8
= help: add `#![feature(const_raw_ptr_to_usize_cast)]` to the crate attributes to enable
9
9
10
-
error[E0080]: it is undefined behavior to use this value
11
-
--> $DIR/issue-52442.rs:2:11
10
+
error[E0080]: evaluation of constant value failed
11
+
--> $DIR/issue-52442.rs:2:13
12
12
|
13
13
LL | [(); { &loop { break } as *const _ as usize } ];
14
-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a pointer, but expected initialized plain (non-pointer) bytes
15
-
|
16
-
= 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
14
+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ "pointer-to-integer cast" needs an rfc before being allowed inside constants
0 commit comments