2019-01-27 05:03:21 -06:00
|
|
|
error: lifetime may not live long enough
|
|
|
|
--> $DIR/lub-if.rs:28:9
|
|
|
|
|
|
|
|
|
LL | pub fn opt_str2<'a>(maybestr: &'a Option<String>) -> &'static str {
|
|
|
|
| -- lifetime `'a` defined here
|
|
|
|
...
|
|
|
|
LL | s
|
|
|
|
| ^ returning this value requires that `'a` must outlive `'static`
|
2019-10-27 09:39:14 -05:00
|
|
|
|
|
|
|
|
= help: consider replacing `'a` with `'static`
|
2019-01-27 05:03:21 -06:00
|
|
|
|
|
|
|
error: lifetime may not live long enough
|
|
|
|
--> $DIR/lub-if.rs:35:9
|
|
|
|
|
|
|
|
|
LL | pub fn opt_str3<'a>(maybestr: &'a Option<String>) -> &'static str {
|
|
|
|
| -- lifetime `'a` defined here
|
|
|
|
...
|
|
|
|
LL | s
|
|
|
|
| ^ returning this value requires that `'a` must outlive `'static`
|
2019-10-27 09:39:14 -05:00
|
|
|
|
|
|
|
|
= help: consider replacing `'a` with `'static`
|
2019-01-27 05:03:21 -06:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|