summaryrefslogtreecommitdiffstats
path: root/tests/ui/regions/regions-assoc-type-static-bound.rs
blob: 1458787ea65a3dd774b76590a376a30a23340d7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// run-pass
#![allow(dead_code)]
// Test that the compiler considers the 'static bound declared in the
// trait. Issue #20890.

// pretty-expanded FIXME #23616

trait Foo {
    type Value: 'static;
    fn dummy(&self) { }
}

fn require_static<T: 'static>() {}

fn takes_foo<F: Foo>() {
    require_static::<F::Value>()
}

fn main() { }