rust/src/test/run-pass/class-attributes-1.rs
2012-07-30 18:38:15 -07:00

12 lines
272 B
Rust

// pp-exact - Make sure we actually print the attributes
class cat {
#[cat_maker]
new(name: ~str) { self.name = name; }
#[cat_dropper]
drop { error! {"%s landed on hir feet",self.name }; }
let name: ~str;
}
fn main() { let _kitty = cat(~"Spotty"); }