blob: 27cb4e979f117a15ad37d1de683d807a3b2b4a97 [file] [log] [blame] [edit]
//@ check-pass
#![deny(unused_must_use)]
use std::future::Future;
use std::pin::Pin;
trait Factory {
type Output;
}
impl Factory for () {
type Output = Pin<Box<dyn Future<Output = ()> + 'static>>;
}
// Make sure we don't get an `unused_must_use` error on the *associated type bound*.
fn f() -> impl Factory<Output: Future> {}
fn main() {
f();
}