]> git.lizzy.rs Git - rust.git/commit
_match.rs: prune sub-match tree too aggressively
authorEdward Wang <edward.yu.wang@gmail.com>
Sat, 22 Mar 2014 12:55:46 +0000 (20:55 +0800)
committerEdward Wang <edward.yu.wang@gmail.com>
Thu, 27 Mar 2014 06:41:10 +0000 (14:41 +0800)
commit4112941202d89477f1b34f559f2c16ef981e8eb6
treef78d7f61a434c5fcfe5cf857834017649c0c32cb
parentc83994e0f492d5e416537cb7ce1063662c0e44e7
_match.rs: prune sub-match tree too aggressively

The `_match.rs` takes advantage of passes prior to `trans` and
aggressively prunes the sub-match tree based on exact equality. When it
comes to literal or range, the strategy may lead to wrong result if
there's guard function or multiple patterns inside tuple.

Closes #12582.
Closes #13027.
src/librustc/middle/trans/_match.rs
src/test/run-pass/issue-12582.rs [new file with mode: 0644]
src/test/run-pass/issue-13027.rs [new file with mode: 0644]