summaryrefslogtreecommitdiffstats
path: root/src/test/ui/attributes/class-attributes-2.rs
blob: 6aba6b89427e4b2429469e2f805fd58d84fbebce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// build-pass (FIXME(62277): could be check-pass?)

#![feature(rustc_attrs)]

struct Cat {
    name: String,
}

impl Drop for Cat {
    #[rustc_dummy]
    /**
       Actually, cats don't always land on their feet when you drop them.
    */
    fn drop(&mut self) {
        println!("{} landed on hir feet", self.name);
    }
}

#[rustc_dummy]
/**
Maybe it should technically be a kitten_maker.
*/
fn cat(name: String) -> Cat {
    Cat {
        name: name
    }
}

fn main() {
    let _kitty = cat("Spotty".to_string());
}