fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
416 B16 linesraw
1// edition: 2021
2// run-rustfix
3#![allow(unused_must_use, dead_code)]
4
5use std::future::Future;
6fn foo() -> impl Future<Output=()> {
7    async { }
8}
9
10fn bar(cx: &mut std::task::Context<'_>) {
11    let fut = foo();
12    let mut pinned = std::pin::pin!(fut);
13    pinned.as_mut().poll(cx);
14    //~^ ERROR no method named `poll` found for opaque type `impl Future<Output = ()>` in the current scope [E0599]
15}
16fn main() {}