blob: f9801c07d7bcbafdde84785914c20734ad8e0683 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// Regression test for #98095: make sure that
// we detect that S needs to outlive 'static.
fn outlives_forall<T>()
where
for<'u> T: 'u,
{
}
fn test1<S>() {
outlives_forall::<S>();
//~^ ERROR `S` does not live long enough
}
struct Value<'a>(&'a ());
fn test2<'a>() {
outlives_forall::<Value<'a>>();
//~^ ERROR lifetime may not live long enough
}
fn main() {}
|