Skip to content

Too many type inside async object must be known in this context errors #66445

Open
@olegnn

Description

@olegnn

This code (Playground)

use futures::stream::{iter/*, StreamExt*/};

async fn produce_11_errors() {
    iter(vec![1, 2, 3])/*.collect::<Vec<_>>()*/.await;
}

fn main() {}

currently produces 11 errors:

  • 1 of the trait bound is not satisfied
  • 10 of type inside async object must be known in this context.

If you add elements to vec, it will generate even more.

Metadata

Metadata

Assignees

Labels

A-async-awaitArea: Async & AwaitA-diagnosticsArea: Messages for errors, warnings, and lintsA-inferenceArea: Type inferenceAsyncAwait-TriagedAsync-await issues that have been triaged during a working group meeting.C-bugCategory: This is a bug.D-verboseDiagnostics: Too much output caused by a single piece of incorrect code.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

Status

Claimed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions