]> git.lizzy.rs Git - rust.git/blob - tests/ui/type-alias-impl-trait/collect_hidden_types.rs
Auto merge of #106458 - albertlarsan68:move-tests, r=jyn514
[rust.git] / tests / ui / type-alias-impl-trait / collect_hidden_types.rs
1 // aux-build:collect_hidden_types.rs
2 use collect_hidden_types::Service;
3 use std::future::Future;
4 use std::pin::Pin;
5 use std::task::Context;
6
7 // build-pass
8
9 // edition:2018
10
11 extern crate collect_hidden_types;
12
13 fn broken(mut a: collect_hidden_types::A, cx: &mut Context<'_>) {
14     let mut fut = a.call(());
15     let _ = unsafe { Pin::new_unchecked(&mut fut) }.poll(cx);
16 }
17
18 pub async fn meeb(cx: &mut Context<'_>) {
19     broken(collect_hidden_types::A, cx);
20 }
21
22 fn main() {}