1 error: lifetime may not live long enough
2 --> $DIR/issue-98589-closures-relate-named-regions.rs:10:5
4 LL | fn test_early_early<'a: 'a, 'b: 'b>() {
5 | -- -- lifetime `'b` defined here
7 | lifetime `'a` defined here
8 LL | || { None::<&'a &'b ()>; };
9 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'b` must outlive `'a`
11 = help: consider adding the following bound: `'b: 'a`
13 error: lifetime may not live long enough
14 --> $DIR/issue-98589-closures-relate-named-regions.rs:15:10
16 LL | fn test_early_late<'a: 'a, 'b>() {
17 | -- -- lifetime `'b` defined here
19 | lifetime `'a` defined here
20 LL | || { None::<&'a &'b ()>; };
21 | ^^^^^^^^^^^^^^^^^^ requires that `'b` must outlive `'a`
23 = help: consider adding the following bound: `'b: 'a`
25 error: lifetime may not live long enough
26 --> $DIR/issue-98589-closures-relate-named-regions.rs:21:10
28 LL | fn test_late_late<'a, 'b>() {
29 | -- -- lifetime `'b` defined here
31 | lifetime `'a` defined here
32 LL | || { None::<&'a &'b ()>; };
33 | ^^^^^^^^^^^^^^^^^^ requires that `'b` must outlive `'a`
35 = help: consider adding the following bound: `'b: 'a`
37 error[E0309]: the parameter type `T` may not live long enough
38 --> $DIR/issue-98589-closures-relate-named-regions.rs:26:10
40 LL | || { None::<&'a T>; };
41 | ^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
43 help: consider adding an explicit lifetime bound...
45 LL | fn test_early_type<'a: 'a, T: 'a>() {
48 error[E0309]: the parameter type `T` may not live long enough
49 --> $DIR/issue-98589-closures-relate-named-regions.rs:32:10
51 LL | || { None::<&'a T>; };
52 | ^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
54 help: consider adding an explicit lifetime bound...
56 LL | fn test_late_type<'a, T: 'a>() {
59 error: aborting due to 5 previous errors
61 For more information about this error, try `rustc --explain E0309`.