Skip to content

Incorrect error: expected Pin<Box<dyn Future>>>, found Pin<Box<impl Future>>> #12145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
arilotter opened this issue May 3, 2022 · 1 comment

Comments

@arilotter
Copy link

rust-analyzer version: 2022-04-11

rustc version: rustc 1.61.0-nightly (76d770ac2 2022-04-02)

relevant settings:

repro:

use core::{future::Future, pin::Pin};

fn test() -> Pin<Box<dyn Future<Output = ()>>> {
    Box::pin(async move {})
}

fn main() {}

Using cargo check, works fine.
In RA, I see expected Pin<Box<dyn Future<Output = ()>, Global>>, found Pin<Box<impl Future<Output = ()>, Global>> rust-analyzer(type-mismatch) underneath the Box::pin(async move {}).

@flodiebold
Copy link
Member

Duplicate of #11815.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants