2019-01-27 11:03:21 +00:00
|
|
|
error: lifetime may not live long enough
|
2022-11-07 09:39:54 +00:00
|
|
|
--> $DIR/wf-static-method.rs:37:5
|
2019-01-27 11:03:21 +00:00
|
|
|
|
|
|
|
|
LL | fn evil<'a, 'b>(b: &'b u32) -> &'a u32 {
|
|
|
|
| -- -- lifetime `'b` defined here
|
|
|
|
| |
|
|
|
|
| lifetime `'a` defined here
|
|
|
|
LL | <()>::static_evil(b)
|
2021-12-31 21:55:34 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b`
|
2019-10-27 14:39:14 +00:00
|
|
|
|
|
|
|
|
= help: consider adding the following bound: `'b: 'a`
|
2019-01-27 11:03:21 +00:00
|
|
|
|
|
|
|
error: lifetime may not live long enough
|
2022-11-07 09:39:54 +00:00
|
|
|
--> $DIR/wf-static-method.rs:42:5
|
2019-01-27 11:03:21 +00:00
|
|
|
|
|
|
|
|
LL | fn indirect_evil<'a, 'b>(b: &'b u32) -> &'a u32 {
|
|
|
|
| -- -- lifetime `'b` defined here
|
|
|
|
| |
|
|
|
|
| lifetime `'a` defined here
|
|
|
|
LL | <IndirectEvil>::static_evil(b)
|
2021-12-31 21:55:34 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b`
|
2019-10-27 14:39:14 +00:00
|
|
|
|
|
|
|
|
= help: consider adding the following bound: `'b: 'a`
|
2019-01-27 11:03:21 +00:00
|
|
|
|
|
|
|
error: lifetime may not live long enough
|
2022-11-07 09:39:54 +00:00
|
|
|
--> $DIR/wf-static-method.rs:47:5
|
2019-01-27 11:03:21 +00:00
|
|
|
|
|
|
|
|
LL | fn inherent_evil<'a, 'b>(b: &'b u32) -> &'a u32 {
|
|
|
|
| -- -- lifetime `'b` defined here
|
|
|
|
| |
|
|
|
|
| lifetime `'a` defined here
|
2021-05-20 14:15:56 +00:00
|
|
|
LL | <Evil>::inherent_evil(b)
|
2021-12-31 21:55:34 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b`
|
2019-10-27 14:39:14 +00:00
|
|
|
|
|
|
|
|
= help: consider adding the following bound: `'b: 'a`
|
2019-01-27 11:03:21 +00:00
|
|
|
|
2022-11-07 09:39:54 +00:00
|
|
|
error: aborting due to 3 previous errors
|
2019-01-27 11:03:21 +00:00
|
|
|
|