1
Fork 0

rustc: Implement the Drop trait. r=brson

This commit is contained in:
Patrick Walton 2012-11-05 17:50:01 -08:00
parent 70886d314d
commit 2904095570
11 changed files with 200 additions and 23 deletions

View file

@ -23,6 +23,11 @@ pub trait Owned {
// Empty.
}
#[lang="drop"]
pub trait Drop {
fn finalize(); // XXX: Rename to "drop"? --pcwalton
}
#[lang="add"]
pub trait Add<RHS,Result> {
pure fn add(rhs: &RHS) -> Result;