Turn old drop blocks into Drop traits

This commit is contained in:
Ben Striegel
2013-02-27 19:13:53 -05:00
parent 33e7a1f087
commit 43d43adf6b
22 changed files with 117 additions and 29 deletions

View File

@@ -66,7 +66,10 @@ pub fn replace<T>(dest: &mut T, src: T) -> T {
/// A non-copyable dummy type.
pub struct NonCopyable {
i: (),
drop { }
}
impl Drop for NonCopyable {
fn finalize(&self) { }
}
pub fn NonCopyable() -> NonCopyable { NonCopyable { i: () } }