]> git.lizzy.rs Git - rust.git/blob - src/test/ui/attributes/class-attributes-1.rs
Require Drop impls to have the same constness on its bounds as the bounds on the...
[rust.git] / src / test / ui / attributes / class-attributes-1.rs
1 // build-pass (FIXME(62277): could be check-pass?)
2 // pp-exact - Make sure we actually print the attributes
3
4 #![feature(rustc_attrs)]
5
6 struct Cat {
7     name: String,
8 }
9
10 impl Drop for Cat {
11     #[rustc_dummy]
12     fn drop(&mut self) { println!("{} landed on hir feet" , self . name); }
13 }
14
15
16 #[rustc_dummy]
17 fn cat(name: String) -> Cat { Cat{name: name,} }
18
19 fn main() { let _kitty = cat("Spotty".to_string()); }