mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
13 lines
214 B
Rust
13 lines
214 B
Rust
/*
|
|
* We don't infer `T: 'static` outlives relationships.
|
|
*/
|
|
|
|
struct Foo<U> {
|
|
bar: Bar<U> //~ ERROR the parameter type `U` may not live long enough [E0310]
|
|
}
|
|
struct Bar<T: 'static> {
|
|
x: T,
|
|
}
|
|
|
|
fn main() {}
|