Drop slots on block exits even when blocks have no statements. Part way to fixing bind leakage in rustc.
This commit is contained in:
parent
f6e3e6903b
commit
62c224ffe4
7 changed files with 156 additions and 90 deletions
11
src/test/run-pass/drop-on-empty-block-exit.rs
Normal file
11
src/test/run-pass/drop-on-empty-block-exit.rs
Normal file
|
@ -0,0 +1,11 @@
|
|||
tag t {
|
||||
foo(@int);
|
||||
}
|
||||
|
||||
fn main() {
|
||||
auto tt = foo(@10);
|
||||
alt (tt) {
|
||||
case (foo(?z)) {
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue