diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2020-07-11 08:53:06 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-11 08:53:06 -0700 |
| commit | b57ceb45b0aa11945c2a7375b097e6389d33f042 (patch) | |
| tree | 65c9a053c894b1aebc33871d7b92096b06df205e | |
| parent | cf91c54cc6e20462bf6c5c63a3ab0b6afe8b7f0e (diff) | |
| parent | 1eb0053dcddcb55e46f8ba5b4083f7a3f5872be0 (diff) | |
| download | rust-b57ceb45b0aa11945c2a7375b097e6389d33f042.tar.gz rust-b57ceb45b0aa11945c2a7375b097e6389d33f042.zip | |
Rollup merge of #72920 - oli-obk:const_transmute, r=RalfJung
Stabilize `transmute` in constants and statics but not const fn cc #53605 (leaving issue open so we can add `transmute` to `const fn` later) Previous attempt: #64011 r? @RalfJung cc @rust-lang/wg-const-eval
| -rw-r--r-- | tests/ui/missing_const_for_fn/could_be_const.stderr | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/tests/ui/missing_const_for_fn/could_be_const.stderr b/tests/ui/missing_const_for_fn/could_be_const.stderr index 8dde56cd79f..74d32b8a1aa 100644 --- a/tests/ui/missing_const_for_fn/could_be_const.stderr +++ b/tests/ui/missing_const_for_fn/could_be_const.stderr @@ -58,14 +58,6 @@ 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 | LL | / pub fn b(self, a: &A) -> B { @@ -73,5 +65,5 @@ LL | | B LL | | } | |_________^ -error: aborting due to 9 previous errors +error: aborting due to 8 previous errors |
