Convert libstd to use the Drop trait

This commit is contained in:
Ben Striegel 2012-11-13 21:38:18 -05:00 committed by Brian Anderson
parent 4b0e1336b2
commit 4589597785
8 changed files with 107 additions and 52 deletions

View file

@ -1133,7 +1133,10 @@ mod big_tests {
val: uint,
key: fn(@uint),
drop {
}
impl LVal : Drop {
fn finalize() {
let x = unsafe { task::local_data::local_data_get(self.key) };
match x {
Some(@y) => {