Skip to content

rocket regression: rigid alias don't require trait to hold #177

Closed
rust-lang/rust
#139828
@compiler-errors

Description

@compiler-errors

https://crater-reports.s3.amazonaws.com/pr-133502-1/try%23fa8e241660363f48d64b66b05eea58c93ab828fb/reg/rocket-0.5.1/log.txt

Minimized:

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

pub trait FromRequest<'r> {
    type Assoc;
    fn from_request() -> Pin<Box<dyn Future<Output = Self::Assoc> + Send>>;
}

fn from_request<'r, T: FromRequest<'r>>() -> Pin<Box<dyn Future<Output = ()> + Send>> {
    Box::pin(async move {
        T::from_request().await;
    })
}

Metadata

Metadata

Labels

from-craterA regression found via a crater run, not part of our test suite

Type

No type

Projects

Status

done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions