Skip to content

existential type complains about '_ in concrete type of self-borrowing generators #60655

Closed
@cramertj

Description

@cramertj

Playground

error: non-defining existential type use in defining scope
  --> src/main.rs:9:22
   |
9  |   fn bar() -> ServeFut {
   |  ______________________^
10 | |     async move {
11 | |         let x = 5;
12 | |         await!(foo(&x))
13 | |     }
14 | | }
   | |_^ lifetime `'_` is part of concrete type but not used in parameter list of existential type

error: aborting due to previous error

cc @oli-obk

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-async-awaitArea: Async & AwaitA-coroutinesArea: CoroutinesA-impl-traitArea: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.AsyncAwait-TriagedAsync-await issues that have been triaged during a working group meeting.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions