]>
git.proxmox.com Git - rustc.git/blob - tests/ui/macros/format-args-temporaries-async.rs
4 use std
::fmt
::{self, Display}
;
5 use std
::future
::Future
;
8 use std
::task
::{Context, Poll}
;
13 fn write_fmt
<'a
>(&'a
mut self, _args
: fmt
::Arguments
) -> WriteFmtFuture
<'a
, Self>
21 struct WriteFmtFuture
<'a
, T
>(&'a
mut T
);
23 impl<'a
, T
> Future
for WriteFmtFuture
<'a
, T
> {
24 type Output
= io
::Result
<()>;
25 fn poll(self: Pin
<&mut Self>, cx
: &mut Context
) -> Poll
<Self::Output
> {
30 async
fn async_main() {
31 let _write
= write
!(&mut AsyncStdout
, "...").await
;
32 let _writeln
= writeln
!(&mut AsyncStdout
, "...").await
;