1 // error-pattern:drop 1
2 // ignore-cloudabi no std::process
4 /// Structure which will not allow to be dropped twice.
5 struct Droppable<'a>(&'a mut bool, u32);
6 impl<'a> Drop for Droppable<'a> {
9 eprintln!("{} dropped twice", self.1);
10 ::std::process::exit(1);
12 eprintln!("drop {}", self.1);
17 fn mir<'a>(d: Droppable<'a>) {
26 mir(Droppable(&mut xv, 1));