rust/src/test/ui/lub-match.nll.stderr

25 lines
764 B
Plaintext

error: lifetime may not live long enough
--> $DIR/lub-match.rs:30:13
|
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`
|
= help: consider replacing `'a` with `'static`
error: lifetime may not live long enough
--> $DIR/lub-match.rs:39:13
|
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`
|
= help: consider replacing `'a` with `'static`
error: aborting due to 2 previous errors