]> git.lizzy.rs Git - rust.git/commit
Make list of statements flat
authorSimonas Kazlauskas <git@kazlauskas.me>
Wed, 24 Feb 2016 15:14:03 +0000 (17:14 +0200)
committerSimonas Kazlauskas <git@kazlauskas.me>
Wed, 24 Feb 2016 20:04:22 +0000 (22:04 +0200)
commit77be4ecc1795787eab4b51b9def35096546122ec
tree298378970f1eefc214a700d333212d25a9409c26
parentfbd817115525b8f11ffe0a301e17341684771369
Make list of statements flat

In MIR we previously tried to match `let x in { exprs; let y in { exprs; }}` with our data
structures which is rather unwieldy, espeicially because it requires some sort of recursion or
stack to process, while, a flat list of statements is enough – lets only relinquish their lifetime
at the end of the block (i.e. end of the list).

Also fixes #31853.
src/librustc/dep_graph/mod.rs
src/librustc_mir/build/block.rs
src/librustc_mir/build/mod.rs
src/librustc_mir/build/scope.rs
src/librustc_mir/build/stmt.rs [deleted file]
src/librustc_mir/hair/cx/block.rs
src/librustc_mir/hair/mod.rs