]> git.lizzy.rs Git - rust.git/blob - tests/ui/regions/regions-assoc-type-static-bound.rs
internally change regions to be covariant
[rust.git] / tests / ui / regions / regions-assoc-type-static-bound.rs
1 // run-pass
2 #![allow(dead_code)]
3 // Test that the compiler considers the 'static bound declared in the
4 // trait. Issue #20890.
5
6 // pretty-expanded FIXME #23616
7
8 trait Foo {
9     type Value: 'static;
10     fn dummy(&self) { }
11 }
12
13 fn require_static<T: 'static>() {}
14
15 fn takes_foo<F: Foo>() {
16     require_static::<F::Value>()
17 }
18
19 fn main() { }