summaryrefslogtreecommitdiffstats
path: root/tests/ui/type-alias-impl-trait/collect_hidden_types.rs
blob: e78f178e464ebe36e8988f3e4dc3bc24b4597d98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// aux-build:collect_hidden_types.rs
use collect_hidden_types::Service;
use std::future::Future;
use std::pin::Pin;
use std::task::Context;

// build-pass

// edition:2018

extern crate collect_hidden_types;

fn broken(mut a: collect_hidden_types::A, cx: &mut Context<'_>) {
    let mut fut = a.call(());
    let _ = unsafe { Pin::new_unchecked(&mut fut) }.poll(cx);
}

pub async fn meeb(cx: &mut Context<'_>) {
    broken(collect_hidden_types::A, cx);
}

fn main() {}