mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			10 lines
		
	
	
		
			303 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
		
			303 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| #![cfg(windows)]
 | |
| 
 | |
| /// Attempting to delete a running binary should return an error on Windows.
 | |
| #[test]
 | |
| #[cfg_attr(miri, ignore)] // `remove_file` does not work in Miri on Windows
 | |
| fn win_delete_self() {
 | |
|     let path = std::env::current_exe().unwrap();
 | |
|     assert!(std::fs::remove_file(path).is_err());
 | |
| }
 | 
