2024-02-22 06:10:29 -06:00
|
|
|
//@ edition:2018
|
|
|
|
//@ check-pass
|
2020-08-03 20:21:33 -05:00
|
|
|
|
|
|
|
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()
|
|
|
|
}
|