blob: 87154e25d4091fbf2f539dc3682ba8d96c33ef53 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// check-pass
use std::marker::PhantomData;
use std::ops::Drop;
// a >= b >= c >= a implies a = b = c
struct DropMe<'a: 'b, 'b: 'c, 'c: 'a>(
PhantomData<&'a ()>,
PhantomData<&'b ()>,
PhantomData<&'c ()>,
);
// a >= b, a >= c, b >= a, c >= a implies a = b = c
impl<'a: 'b + 'c, 'b: 'a, 'c: 'a> Drop for DropMe<'a, 'b, 'c> {
fn drop(&mut self) {}
}
fn main() {}
|