diff options
| author | Ben Striegel <ben.striegel@gmail.com> | 2013-02-27 19:13:53 -0500 |
|---|---|---|
| committer | Ben Striegel <ben.striegel@gmail.com> | 2013-02-27 19:14:19 -0500 |
| commit | 43d43adf6bd2024b1ddc0e596d4bed88e1df82b1 (patch) | |
| tree | 62bc69f2ad5f4e78dfef71a5555e1be4b4ec3aed /src/libcore/util.rs | |
| parent | 33e7a1f087b3b8047891b91fa95c5626042e7f6e (diff) | |
| download | rust-43d43adf6bd2024b1ddc0e596d4bed88e1df82b1.tar.gz rust-43d43adf6bd2024b1ddc0e596d4bed88e1df82b1.zip | |
Turn old `drop` blocks into `Drop` traits
Diffstat (limited to 'src/libcore/util.rs')
| -rw-r--r-- | src/libcore/util.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libcore/util.rs b/src/libcore/util.rs index 629c4a3291c..522cb2d2783 100644 --- a/src/libcore/util.rs +++ b/src/libcore/util.rs @@ -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: () } } |
