Skip to content

Commit

Permalink
Add more realistic example of async error
Browse files Browse the repository at this point in the history
  • Loading branch information
jyn514 committed Aug 4, 2020
1 parent 31fcda1 commit 70697d8
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/test/rustdoc-ui/error-in-impl-trait/realistic-async.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// edition:2018
// check-pass

mod windows {
pub trait WinFoo {
fn foo(&self) {}
}

impl WinFoo for () {}
}

#[cfg(any(windows, doc))]
use windows::*;

mod unix {
pub trait UnixFoo {
fn foo(&self) {}
}

impl UnixFoo for () {}
}

#[cfg(any(unix, doc))]
use unix::*;

async fn bar() {
().foo()
}

0 comments on commit 70697d8

Please sign in to comment.