blob: 62490604d83e00fb97cc7e4f2d4ce60ad19cb6d8 [file] [log] [blame]
//@ edition: 2021
//@ revisions: rpitit assoc_ty
#![deny(unused_must_use)]
use std::future::Future;
pub trait Tr {
type Fut: Future<Output = ()>;
#[cfg(rpitit)]
fn foo() -> impl Future<Output = ()>;
#[cfg(assoc_ty)]
fn foo() -> Self::Fut;
}
pub async fn bar<T: Tr>() {
T::foo();
//~^ ERROR unused implementer of `Future` that must be used
}
fn main() {}