Uh oh!
There was an error while loading. Please reload this page.
const_fn: Check the terminating expression of a block for blocks in a const initializer - #33169
Conversation
rust-highfive
commented
Apr 23, 2016
r? @jroesch (rust_highfive has picked a reviewer for you, use r? to override) |
bors
commented
May 8, 2016
☔ The latest upstream changes (presumably #33130) made this pull request unmergeable. Please resolve the merge conflicts. |
eddyb
commented
May 9, 2016
@swgillespie Can you rebase and check if these tests cause errors without any actual changes to the compiler? The approach taken in #33130 is a bit more general than the old checks. |
swgillespie
commented
May 9, 2016
@eddyb will do! |
swgillespie
commented
May 10, 2016
@eddyb This works fine with your changes so this PR is just a regression test now. |
eddyb
commented
May 10, 2016
@bors r+ |
bors
commented
May 10, 2016
📌 Commit 2467d40 has been approved by |
bors
commented
May 10, 2016
⌛ Testing commit 2467d40 with merge 926cee0... |
bors
commented
May 10, 2016
💔 Test failed - auto-linux-64-opt-rustbuild |
eddyb
commented
May 10, 2016
@swgillespie Aww, tidy failure. |
swgillespie
commented
May 11, 2016
@eddyb should be fixed now. |
eddyb
commented
May 11, 2016
@bors r+ |
bors
commented
May 11, 2016
📌 Commit 94a0552 has been approved by |
bors
commented
May 11, 2016
⌛ Testing commit 94a0552 with merge bcf107c... |
bors
commented
May 11, 2016
💔 Test failed - auto-win-gnu-32-opt-rustbuild |
alexcrichton
commented
May 11, 2016
@bors: retry
On Wed, May 11, 2016 at 3:15 AM, bors notifications@github.com wrote:
|
bors
commented
May 12, 2016
const_fn: Check the terminating expression of a block for blocks in a const initializer In a const or static initializer, the `CheckBlock` check ensures that blocks in the initializer expression are only in tail positions or in items. In this case, it didn't check the terminating expression of a block, which resulted in an ICE later in the compiler pipeline if the trailing expression was itself a block. This change fixes the ICE and ensures that the proper error is emitted. This fixes the ICE in #32829 .
In a const or static initializer, the
CheckBlockcheck ensures that blocks in the initializer expression are only in tail positions or in items. In this case, it didn't check the terminating expression of a block, which resulted in an ICE later in the compiler pipeline if the trailing expression was itself a block. This change fixes the ICE and ensures that the proper error is emitted. This fixes the ICE in #32829 .