Skip to content

Commit

Permalink
fix stage0 build
Browse files Browse the repository at this point in the history
  • Loading branch information
thestinger committed Jun 28, 2013
1 parent 5fccce4 commit c45af01
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/libstd/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,23 +173,26 @@ mod tests {

// verify that `#[unsafe_no_drop_flag]` works as intended on a zero-size struct

static mut did_run: bool = false;
// NOTE: uncomment after snapshot, will not parse yet
//static mut did_run: bool = false;

struct Foo { five: int }

impl Drop for Foo {
fn drop(&self) {
assert_eq!(self.five, 5);
unsafe {
did_run = true;
}
// NOTE: uncomment after snapshot, will not parse yet
//unsafe {
//did_run = true;
//}
}
}

{
let _a = (NonCopyable, Foo { five: 5 }, NonCopyable);
}

unsafe { assert_eq!(did_run, true); }
// NOTE: uncomment after snapshot, will not parse yet
//unsafe { assert_eq!(did_run, true); }
}
}

0 comments on commit c45af01

Please sign in to comment.