mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 10:18:25 +00:00
24 lines
704 B
Rust
24 lines
704 B
Rust
// Repro for <https://github.com/rust-lang/rust/issues/111105#issue-1692860759>.
|
|
//@ edition: 2021
|
|
//@ revisions: assumptions no_assumptions
|
|
//@[assumptions] compile-flags: -Zhigher-ranked-assumptions
|
|
//@[assumptions] check-pass
|
|
//@[no_assumptions] known-bug: #110338
|
|
|
|
use std::future::Future;
|
|
|
|
pub trait Foo: Sync {
|
|
fn run<'a, 'b: 'a, T: Sync>(&'a self, _: &'b T) -> impl Future<Output = ()> + 'a + Send;
|
|
}
|
|
|
|
pub trait FooExt: Foo {
|
|
fn run_via<'a, 'b: 'a, T: Sync>(&'a self, t: &'b T) -> impl Future<Output = ()> + 'a + Send {
|
|
async move {
|
|
// asks for an unspecified lifetime to outlive itself? weird diagnostics
|
|
self.run(t).await;
|
|
}
|
|
}
|
|
}
|
|
|
|
fn main() {}
|