-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsP-mediumMedium priorityMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
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.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsP-mediumMedium priorityMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.