Skip to content

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

Closed

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.

Activity

  1. added
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    AsyncAwait-PolishAsync-await issues that are part of the "polish" area
    on Aug 12, 2019
  2. self-assigned this
    on Aug 13, 2019
  3. added 2 commits that reference this issue on Aug 14, 2019
    6651373
    5741e29
  4. added a commit that references this issue on Aug 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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