auto merge of #14787 : alexcrichton/rust/issue-14784, r=pcwalton

This is another case of #13246. The RAII lock wasn't being destroyed until after
the allocation was free'd due to destructor scheduling.

Closes #14784
This commit is contained in:
bors 2014-06-11 04:22:02 -07:00
commit db9e0a1142
1 changed files with 2 additions and 1 deletions

View File

@ -54,7 +54,8 @@ pub fn run() {
rtassert!(queue != 0);
let queue: Box<Queue> = mem::transmute(queue);
mem::replace(&mut *queue.lock(), Vec::new())
let v = mem::replace(&mut *queue.lock(), Vec::new());
v
};
for to_run in cur.move_iter() {