Skip to content

New higher-ranked lifetime error #105501

Closed
@khuey

Description

@khuey
Contributor
error: higher-ranked lifetime error
   --> lobby-server/src/auth/github.rs:340:9
    |
340 | /         Box::pin(async move {
341 | |             let gh = this
342 | |                 .http
343 | |                 .request(req)
...   |
468 | |             }
469 | |         })
    | |__________^
    |
    = note: could not prove `std::pin::Pin<Box<[async block@lobby-server/src/auth/github.rs:340:18: 469:10]>>: CoerceUnsized<std::pin::Pin<Box<(dyn futures::Future<Output = std::result::Result<(auth::AuthenticationData, http::response::Builder), http::response::Builder>> + std::marker::Send + 'c)>>>`

error: higher-ranked lifetime error
   --> lobby-server/src/lib.rs:568:33
    |
568 | ...                   tokio::spawn(f);
    |                       ^^^^^^^^^^^^^^^
    |
    = note: could not prove `futures::future::MapErr<TryForEach<impl futures::Stream<Item = std::result::Result<logger::LoggerMessage, errors::Error>>, [async block@lobby-server/src/lib.rs:562:41: 565:42], [closure@lobby-server/src/lib.rs:560:51: 560:69]>, [closure@lobby-server/src/lib.rs:567:46: 567:49]>: std::marker::Send`

The code here is part of a closed-source project unfortunately. I could share relevant bits and pieces upon request but I can't provide the whole thing for others to build.

cargo bisect-rustc blames b28d30e

Activity

khuey

khuey commented on Dec 9, 2022

@khuey
ContributorAuthor

Reverting #105250 on top of e10201c fixes this.

added a commit that references this issue on Dec 19, 2022

Rollup merge of rust-lang#105915 - andrewpollack:revert-105250-async-…

575b2a2
added a commit that references this issue on Dec 30, 2022

Auto merge of rust-lang#106264 - Swatinem:higher-lifetime-regression,…

added a commit that references this issue on Jan 18, 2023

Rollup merge of rust-lang#105977 - Swatinem:async-mir-context, r=oli-obk

e538945
added a commit that references this issue on Jan 19, 2023
added a commit that references this issue on Jan 19, 2023

Rollup merge of rust-lang#105977 - Swatinem:async-mir-context, r=oli-obk

30ddeef
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.P-criticalCritical priorityregression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @khuey@tmandry

      Issue actions

        New higher-ranked lifetime error · Issue #105501 · rust-lang/rust