Skip to content

Commit b57ceb4

Browse files
authored
Rollup merge of rust-lang#72920 - oli-obk:const_transmute, r=RalfJung
Stabilize `transmute` in constants and statics but not const fn cc rust-lang#53605 (leaving issue open so we can add `transmute` to `const fn` later) Previous attempt: rust-lang#64011 r? @RalfJung cc @rust-lang/wg-const-eval
2 parents cf91c54 + 1eb0053 commit b57ceb4

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

tests/ui/missing_const_for_fn/could_be_const.stderr

+1-9
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,6 @@ LL | | t
5757
LL | | }
5858
| |_^
5959

60-
error: this could be a `const fn`
61-
--> $DIR/could_be_const.rs:48:1
62-
|
63-
LL | / fn sub(x: u32) -> usize {
64-
LL | | unsafe { transmute(&x) }
65-
LL | | }
66-
| |_^
67-
6860
error: this could be a `const fn`
6961
--> $DIR/could_be_const.rs:67:9
7062
|
@@ -73,5 +65,5 @@ LL | | B
7365
LL | | }
7466
| |_________^
7567

76-
error: aborting due to 9 previous errors
68+
error: aborting due to 8 previous errors
7769

0 commit comments

Comments
 (0)