rust/tests/ui/dropck/transitive-outlives-2.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
381 B
Rust
Raw Normal View History

2023-04-21 13:04:39 -05:00
//@ 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() {}