]>
Commit | Line | Data |
---|---|---|
2b03887a | 1 | error: lifetime may not live long enough |
9ffffee4 | 2 | --> $DIR/implied_lifetime_wf_check3.rs:7:43 |
2b03887a FG |
3 | | |
4 | LL | fn test<'a>() where Ty<'a>: 'static { assert_static::<'a>() } | |
5 | | -- lifetime `'a` defined here ^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static` | |
6 | ||
7 | error: lifetime may not live long enough | |
9ffffee4 | 8 | --> $DIR/implied_lifetime_wf_check3.rs:15:46 |
2b03887a FG |
9 | | |
10 | LL | fn test<'a>() where for<'b> Ty<'b>: 'a { assert_static::<'a>() } | |
11 | | -- lifetime `'a` defined here ^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static` | |
12 | ||
13 | error: lifetime may not live long enough | |
9ffffee4 | 14 | --> $DIR/implied_lifetime_wf_check3.rs:21:21 |
2b03887a FG |
15 | | |
16 | LL | fn test<'a>() { assert_static::<'a>() } | |
17 | | -- ^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static` | |
18 | | | | |
19 | | lifetime `'a` defined here | |
20 | ||
21 | error[E0310]: the parameter type `A` may not live long enough | |
9ffffee4 | 22 | --> $DIR/implied_lifetime_wf_check3.rs:29:41 |
2b03887a FG |
23 | | |
24 | LL | fn test<A>() where Ty<A>: 'static { assert_static::<A>() } | |
25 | | ^^^^^^^^^^^^^^^^^^ ...so that the type `A` will meet its required lifetime bounds | |
26 | | | |
27 | help: consider adding an explicit lifetime bound... | |
28 | | | |
29 | LL | fn test<A: 'static>() where Ty<A>: 'static { assert_static::<A>() } | |
30 | | +++++++++ | |
31 | ||
9ffffee4 | 32 | error: aborting due to 4 previous errors |
2b03887a FG |
33 | |
34 | For more information about this error, try `rustc --explain E0310`. |