]> git.lizzy.rs Git - rust.git/commit
Auto merge of #33169 - swgillespie:issue32829, r=eddyb
authorbors <bors@rust-lang.org>
Thu, 12 May 2016 02:48:54 +0000 (19:48 -0700)
committerbors <bors@rust-lang.org>
Thu, 12 May 2016 02:48:54 +0000 (19:48 -0700)
commited1ece6fd8e9980501556a3c85365c7e29202975
tree3c370617f22c62f843a0c57d58b7f6225e87dba0
parent22ac88f1a47a82195a49fbff3cf24a2c395d7a81
parent94a055263eb96bf7f692854a0d16ade2f65d3b27
Auto merge of #33169 - swgillespie:issue32829, r=eddyb

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 .