diff options
| author | Joshua Nelson <jyn514@gmail.com> | 2020-08-03 21:21:33 -0400 |
|---|---|---|
| committer | Joshua Nelson <jyn514@gmail.com> | 2020-08-03 21:26:59 -0400 |
| commit | 70697d8be87635d294f29c9c7a2a31b8ed08e49c (patch) | |
| tree | 3553d4600b6b279c74c2e037c353c8be01686c4a | |
| parent | 31fcda170a0671195b7a1506b09c5f655fc4d7e9 (diff) | |
| download | rust-70697d8be87635d294f29c9c7a2a31b8ed08e49c.tar.gz rust-70697d8be87635d294f29c9c7a2a31b8ed08e49c.zip | |
Add more realistic example of async error
| -rw-r--r-- | src/test/rustdoc-ui/error-in-impl-trait/realistic-async.rs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/test/rustdoc-ui/error-in-impl-trait/realistic-async.rs b/src/test/rustdoc-ui/error-in-impl-trait/realistic-async.rs new file mode 100644 index 00000000000..248575d3528 --- /dev/null +++ b/src/test/rustdoc-ui/error-in-impl-trait/realistic-async.rs @@ -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() +} |
