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