mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
19 lines
381 B
Rust
19 lines
381 B
Rust
//@ 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() {}
|