mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 19:23:50 +00:00
29 lines
340 B
Rust
29 lines
340 B
Rust
//@ 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()
|
|
}
|