]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/class-attributes-1.rs
Merge remote-tracking branch 'luqmana/incoming'
[rust.git] / src / test / run-pass / class-attributes-1.rs
1 // pp-exact - Make sure we actually print the attributes
2
3 struct cat {
4     name: ~str,
5 }
6
7 impl cat: Drop {
8     #[cat_dropper]
9     fn finalize(&self) { error!("%s landed on hir feet",self.name); }
10 }
11
12
13 #[cat_maker]
14 fn cat(name: ~str) -> cat { cat{name: name,} }
15
16 fn main() { let _kitty = cat(~"Spotty"); }