summaryrefslogtreecommitdiffstats
path: root/src/test/ui/rfc-2093-infer-outlives/dont-infer-static.rs
blob: d3940b13b11ae71bdd418db61fdf92cae93f986b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/*
 * 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() {}