rust/src/test/ui/lub-if.stderr

30 lines
1.0 KiB
Plaintext
Raw Normal View History

2018-08-08 14:28:26 +02:00
error[E0312]: lifetime of reference outlives lifetime of borrowed content...
2018-12-25 08:56:47 -07:00
--> $DIR/lub-if.rs:28:9
2018-08-08 14:28:26 +02:00
|
LL | s //~ ERROR E0312
| ^
|
= note: ...the reference is valid for the static lifetime...
2018-12-25 08:56:47 -07:00
note: ...but the borrowed content is only valid for the lifetime 'a as defined on the function body at 23:17
--> $DIR/lub-if.rs:23:17
2018-08-08 14:28:26 +02:00
|
LL | pub fn opt_str2<'a>(maybestr: &'a Option<String>) -> &'static str {
| ^^
error[E0312]: lifetime of reference outlives lifetime of borrowed content...
2018-12-25 08:56:47 -07:00
--> $DIR/lub-if.rs:35:9
2018-08-08 14:28:26 +02:00
|
LL | s //~ ERROR E0312
| ^
|
= note: ...the reference is valid for the static lifetime...
2018-12-25 08:56:47 -07:00
note: ...but the borrowed content is only valid for the lifetime 'a as defined on the function body at 32:17
--> $DIR/lub-if.rs:32:17
2018-08-08 14:28:26 +02:00
|
LL | pub fn opt_str3<'a>(maybestr: &'a Option<String>) -> &'static str {
| ^^
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0312`.