summaryrefslogtreecommitdiffstats
path: root/tests/ui/regions/issue-21520.rs
blob: ab4ac7237c787271aa2313671de6a424fcdcc310 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// check-pass
#![allow(dead_code)]
// Test that the requirement (in `Bar`) that `T::Bar : 'static` does
// not wind up propagating to `T`.

// pretty-expanded FIXME #23616

pub trait Foo {
    type Bar;

    fn foo(&self) -> Self;
}

pub struct Static<T:'static>(T);

struct Bar<T:Foo>
    where T::Bar : 'static
{
    x: Static<Option<T::Bar>>
}

fn main() { }