// Repro for . //@ edition: 2021 //@ revisions: assumptions no_assumptions //@[assumptions] compile-flags: -Zhigher-ranked-assumptions //@[assumptions] check-pass //@[no_assumptions] known-bug: #110338 use std::future::Future; fn main() { let call_me = Wrap(CallMeImpl { value: "test" }); assert_send(async { call_me.call().await; }); } pub fn assert_send(_future: F) where F: Future + Send, { } pub trait CallMe { fn call(&self) -> impl Future + Send; } struct Wrap(T); impl CallMe for Wrap where S: CallMe + Send, { // adding `+ Send` to this RPIT fixes the issue fn call(&self) -> impl Future { self.0.call() } } #[derive(Debug, Clone, Copy)] pub struct CallMeImpl { value: T, } impl CallMe for CallMeImpl where // Can replace `Send` by `ToString`, `Clone`, whatever. When removing the // `Send` bound, the compiler produces a higher-ranked lifetime error. T: Send + 'static, { fn call(&self) -> impl Future { async {} } }