From: bors Date: Thu, 12 May 2016 02:48:54 +0000 (-0700) Subject: Auto merge of #33169 - swgillespie:issue32829, r=eddyb X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=ed1ece6fd8e9980501556a3c85365c7e29202975;p=rust.git 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 . --- ed1ece6fd8e9980501556a3c85365c7e29202975