rust/src/test/run-pass/class-attributes-1.rs
2012-09-06 10:52:26 -07:00

13 lines
269 B
Rust

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