2 // error-pattern:drop 1
3 // ignore-emscripten no processes
5 /// Structure which will not allow to be dropped twice.
6 struct Droppable<'a>(&'a mut bool, u32);
7 impl<'a> Drop for Droppable<'a> {
10 eprintln!("{} dropped twice", self.1);
11 ::std::process::exit(1);
13 eprintln!("drop {}", self.1);
18 fn mir<'a>(d: Droppable<'a>) {
27 mir(Droppable(&mut xv, 1));