Skip to content

New higher-ranked lifetime error #105501

Closed
@khuey

Description

@khuey
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

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

    No branches or pull requests

    Issue actions