]> git.lizzy.rs Git - rust.git/commit
Simplify lifetimes by allocating patterns on the arena
authorNadrieril <nadrieril+git@gmail.com>
Thu, 28 Nov 2019 13:03:02 +0000 (13:03 +0000)
committerNadrieril <nadrieril+git@gmail.com>
Mon, 2 Dec 2019 16:00:24 +0000 (16:00 +0000)
commite6aa96246fe6125dae72d2840749f2859b49a47f
tree1f56af6dfb377f0a0be6608fd6f7f62e1201b0c5
parent21af89d773cc76eaf7240e4a16f30d4cd29139e1
Simplify lifetimes by allocating patterns on the arena

We want the lifetimes of the patterns contained in the matrix and the
candidate `PatStack` to be the same so that they can be mixed together.
A lot of this would not be necessary if `SmallVec` was covariant in its
type argument (see https://github.com/servo/rust-smallvec/issues/146).
src/librustc_mir/hair/pattern/_match.rs
src/librustc_mir/hair/pattern/check_match.rs