]> git.lizzy.rs Git - rust.git/commit
Auto merge of #42023 - nikomatsakis:issue-36799-ostn15_phf, r=arielb1
authorbors <bors@rust-lang.org>
Tue, 23 May 2017 09:55:40 +0000 (09:55 +0000)
committerbors <bors@rust-lang.org>
Tue, 23 May 2017 09:55:40 +0000 (09:55 +0000)
commit5b13bff5203c1bdc6ac6dc87f69b5359a9503078
tree8338acddadde092f977e7814f28b25fa68922841
parent9fa25a7df3a1101a1dac611f3e45fa5b09836d27
parent8a4e5933df9a9252080f445b29621acc4afb459a
Auto merge of #42023 - nikomatsakis:issue-36799-ostn15_phf, r=arielb1

introduce local-scope to prevent `StorageLive`/`StorageDead` in statics

In investigating #36799, I found that we were creating storage-live/storage-dead instructions in statics/constants, where they are not needed. This arose due to the fix for local scopes. This PR tries to fix that (and adds a test -- I'm curious if there is a way to make that test more targeted, though).

r? @arielb1
src/librustc_mir/build/mod.rs
src/librustc_mir/hair/cx/mod.rs