mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-28 11:38:01 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			29 lines
		
	
	
		
			338 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			338 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()
 | |
| }
 | 
