make fs.rs at least build under Windows

This commit is contained in:
Ralf Jung 2020-03-23 23:48:12 +01:00
parent c4e29c8646
commit 3ba588db49

View file

@ -142,7 +142,10 @@ fn test_symlink() {
let symlink_path = prepare("miri_test_fs_symlink.txt");
// Creating a symbolic link should succeed.
#[cfg(unix)]
std::os::unix::fs::symlink(&path, &symlink_path).unwrap();
#[cfg(windows)]
std::os::windows::fs::symlink_file(&path, &symlink_path).unwrap();
// Test that the symbolic link has the same contents as the file.
let mut symlink_file = File::open(&symlink_path).unwrap();
let mut contents = Vec::new();