Closed
Description
Example (playground):
error: `async fn` return type cannot contain a projection or `Self` that references lifetimes from a parent scope
--> src/lib.rs:4:33
|
4 | async fn new(i: &'a i32) -> Self {
| ^^^^
- Add a hint: try spelling out the type instead
- Add an error code with an entry in the error index explaining that this is a limitation of the compiler, tracked by Inherent async fn returning
Self
treats type's lifetime parameters as'static
#61949
Metadata
Metadata
Assignees
Labels
Area: Async & AwaitArea: Messages for errors, warnings, and lintsAsync-await issues that have been triaged during a working group meeting.Category: An issue proposing an enhancement or a PR with one.Diagnostics: An error or lint that needs small tweaks.Diagnostics: An error or lint that doesn't give enough information about the problem at hand.Medium priorityRelevant to the compiler team, which will review and decide on the PR/issue.
Type
Projects
Status
Done