Skip to content

async fn methods and impl '_ elision do not interact correctly #63500

Closed
@nikomatsakis

Description

@nikomatsakis

As reported by @cramertj, this example:

#![feature(async_await)]

struct Foo<'a>(&'a u8);

impl Foo<'_> {
    async fn bar() {}
}

currently produces this error:

error[E0261]: use of undeclared lifetime name `'_`

error: aborting due to previous error

but it should work just fine.

Metadata

Metadata

Assignees

Labels

A-async-awaitArea: Async & AwaitA-inferenceArea: Type inferenceA-lifetimesArea: Lifetimes / regionsAsyncAwait-PolishAsync-await issues that are part of the "polish" areaT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions