diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-08-20 19:45:11 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-20 19:45:11 +0200 |
| commit | e93edf3335ef172274acb208d672db51d40eeb2f (patch) | |
| tree | b7c7cff9421c7a75c92d32e3bfaa1bb0b27eb8c1 /library/std/src/sys | |
| parent | 8828af4d88f69a3fce63e7ea6420f3363127802c (diff) | |
| parent | fbcdf2a383f6b17f80d8c285af3fa9739aaf223c (diff) | |
| download | rust-e93edf3335ef172274acb208d672db51d40eeb2f.tar.gz rust-e93edf3335ef172274acb208d672db51d40eeb2f.zip | |
Rollup merge of #100129 - RalfJung:miri-test-libstd, r=thomcc
add miri-test-libstd support to libstd - The first commit mirrors what we already have in liballoc. - The second commit adds some regression tests that only really make sense to be run in Miri, since they rely on Miri's extra checks to detect anything. - The third commit makes the MPSC tests work in reasonable time in Miri by reducing iteration counts. - The fourth commit silences some warnings due to code being disabled with `cfg(miri)`
Diffstat (limited to 'library/std/src/sys')
| -rw-r--r-- | library/std/src/sys/unix/fs.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/sys/unix/fs.rs b/library/std/src/sys/unix/fs.rs index 7778033eaa9..f38d2fd3d70 100644 --- a/library/std/src/sys/unix/fs.rs +++ b/library/std/src/sys/unix/fs.rs @@ -829,6 +829,7 @@ impl DirEntry { target_os = "fuchsia", target_os = "redox" )))] + #[cfg_attr(miri, allow(unused))] fn name_cstr(&self) -> &CStr { unsafe { CStr::from_ptr(self.entry.d_name.as_ptr()) } } @@ -840,6 +841,7 @@ impl DirEntry { target_os = "fuchsia", target_os = "redox" ))] + #[cfg_attr(miri, allow(unused))] fn name_cstr(&self) -> &CStr { &self.name } |
