small corrections

This commit is contained in:
Christian Poveda 2020-01-10 12:01:05 -05:00
parent 91cf68fac5
commit 0b5a30515e
No known key found for this signature in database
GPG key ID: 27525EF5E7420A50
2 changed files with 3 additions and 3 deletions

View file

@ -337,7 +337,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
let this = self.eval_context_mut();
if this.tcx.sess.target.target.target_os.to_lowercase() != "macos" {
throw_unsup_format!("The `stat` shim is only available for `macos` targets.")
throw_unsup_format!("The `stat` and `lstat` shims are only available for `macos` targets.")
}
let path_scalar = this.read_scalar(path_op)?.not_undef()?;

View file

@ -22,8 +22,8 @@ fn main() {
let symlink_path = tmp.join("miri_test_fs_symlink.txt");
let bytes = b"Hello, World!\n";
// Clean the paths for robustness.
remove_file(&path).unwrap_or(());
remove_file(&symlink_path).unwrap_or(());
remove_file(&path).ok();
remove_file(&symlink_path).ok();
// Test creating, writing and closing a file (closing is tested when `file` is dropped).
let mut file = File::create(&path).unwrap();