mirror of
https://github.com/rust-lang/rust
synced 2024-09-06 01:11:17 +00:00
21 lines
630 B
Plaintext
21 lines
630 B
Plaintext
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`
|
|
|
|
error: lifetime may not live long enough
|
|
--> $DIR/lub-if.rs:36: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`
|
|
|
|
error: aborting due to 2 previous errors
|
|
|