mirror of
https://github.com/rust-lang/rust
synced 2024-09-05 16:57:03 +00:00
20 lines
338 B
Rust
20 lines
338 B
Rust
//@ 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() { }
|