]>
git.proxmox.com Git - rustc.git/blob - tests/ui/mir/mir_dynamic_drops_1.rs
2 // error-pattern:drop 1
3 // error-pattern:drop 2
4 // ignore-emscripten no processes
6 /// Structure which will not allow to be dropped twice.
7 struct Droppable
<'a
>(&'a
mut bool
, u32);
8 impl<'a
> Drop
for Droppable
<'a
> {
11 eprintln
!("{} dropped twice", self.1);
12 ::std
::process
::exit(1);
14 eprintln
!("drop {}", self.1);
20 let (mut xv
, mut yv
) = (false, false);
21 let x
= Droppable(&mut xv
, 1);
22 let y
= Droppable(&mut yv
, 2);