Skip to content

Commit

Permalink
Rollup merge of rust-lang#72920 - oli-obk:const_transmute, r=RalfJung
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Manishearth committed Jul 11, 2020
2 parents cf91c54 + 1eb0053 commit b57ceb4
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions tests/ui/missing_const_for_fn/could_be_const.stderr
Expand Up @@ -57,14 +57,6 @@ LL | | t
LL | | }
| |_^

error: this could be a `const fn`
--> $DIR/could_be_const.rs:48:1
|
LL | / fn sub(x: u32) -> usize {
LL | | unsafe { transmute(&x) }
LL | | }
| |_^

error: this could be a `const fn`
--> $DIR/could_be_const.rs:67:9
|
Expand All @@ -73,5 +65,5 @@ LL | | B
LL | | }
| |_________^

error: aborting due to 9 previous errors
error: aborting due to 8 previous errors

0 comments on commit b57ceb4

Please sign in to comment.