summary refs log tree commit diff
path: root/src/test/ui/attributes/class-attributes-2.rs
blob: 348c70f35c328c8d359c37e883de70ca951e65cc (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
// compile-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());
}