rust/src/test/run-pass/class-attributes-1.rs

12 lines
269 B
Rust
Raw Normal View History

// pp-exact - Make sure we actually print the attributes
2012-08-16 16:26:10 -05:00
struct cat {
#[cat_maker]
new(name: ~str) { self.name = name; }
#[cat_dropper]
2012-07-30 20:03:50 -05:00
drop { error! {"%s landed on hir feet",self.name }; }
name: ~str;
}
fn main() { let _kitty = cat(~"Spotty"); }