mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 11:44:28 +00:00
22 lines
363 B
Rust
22 lines
363 B
Rust
//@ 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();
|
|
}
|