summaryrefslogtreecommitdiffstats
path: root/third_party/rust/pin-project/tests/no_infer_outlives.rs
blob: 6602b62c9927b0c74ed3ef8aee652b2f257c02df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use pin_project::{pin_project, project};

trait Bar<X> {
    type Y;
}

struct Example<A>(A);

impl<X, T> Bar<X> for Example<T> {
    type Y = Option<T>;
}

#[pin_project]
struct Foo<A, B> {
    _x: <Example<A> as Bar<B>>::Y,
}

#[project]
impl<A, B> Foo<A, B> {}