]> git.lizzy.rs Git - rust.git/blob - tests/ui/attributes/class-attributes-2.rs
Rollup merge of #106144 - tgross35:patch-1, r=Mark-Simulacrum
[rust.git] / tests / ui / attributes / class-attributes-2.rs
1 // build-pass (FIXME(62277): could be check-pass?)
2
3 #![feature(rustc_attrs)]
4
5 struct Cat {
6     name: String,
7 }
8
9 impl Drop for Cat {
10     #[rustc_dummy]
11     /**
12        Actually, cats don't always land on their feet when you drop them.
13     */
14     fn drop(&mut self) {
15         println!("{} landed on hir feet", self.name);
16     }
17 }
18
19 #[rustc_dummy]
20 /**
21 Maybe it should technically be a kitten_maker.
22 */
23 fn cat(name: String) -> Cat {
24     Cat {
25         name: name
26     }
27 }
28
29 fn main() {
30     let _kitty = cat("Spotty".to_string());
31 }