Add more realistic example of async error
This commit is contained in:
parent
31fcda170a
commit
70697d8be8
1 changed files with 28 additions and 0 deletions
28
src/test/rustdoc-ui/error-in-impl-trait/realistic-async.rs
Normal file
28
src/test/rustdoc-ui/error-in-impl-trait/realistic-async.rs
Normal file
|
@ -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()
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue