Closed
Description
I got the following suggestion for correcting error:
help: consider using an explicit lifetime parameter as shown: fn string_by_path<'a, 'b>(doc: &'a Json, path: &'b [&'b str])
-> Result<String, Box<Error+ 'c>>
--> src/main.rs:16:1
|
16 | fn string_by_path<'a,'b,'c>(doc: &'a Json, path: &'b [&'b str]) -> Result<String, Box<Error + 'c>> {
| ^
But (irrelevant if this is going towards better solution or not) the suggestion is clearly illegal, because it's missing 'c
which exists in the return type.