]> git.lizzy.rs Git - rust.git/commit
Adjust codegen logic for range and guarded arms
authorEdward Wang <edward.yu.wang@gmail.com>
Sun, 4 May 2014 22:16:16 +0000 (06:16 +0800)
committerEdward Wang <edward.yu.wang@gmail.com>
Mon, 5 May 2014 12:17:59 +0000 (20:17 +0800)
commit90449abcb30ed8b0fd1bab84f45630769f668247
tree2f79c88226113a85a0980b3199d42ed08e42dd56
parent7adc48527fa0505a0cda6eaf1b6cafb01e434170
Adjust codegen logic for range and guarded arms

By carefully distinguishing falling back to the default arm from moving
on to the next pattern, this patch adjusts the codegen logic for range
and guarded arms of pattern matching expression. It is a more
appropriate way of fixing #12582 and #13027 without causing regressions
such as #13867.

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