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