Skip to content

Commit 20ab57e

Browse files
committed
library: allow some unused things in Miri
1 parent a5406fe commit 20ab57e

File tree

1 file changed

+3
-2
lines changed
  • library/std/src/sys/unix

1 file changed

+3
-2
lines changed

library/std/src/sys/unix/fs.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// miri has some special hacks here that make things unused.
2+
#![cfg_attr(miri, allow(unused))]
3+
14
use crate::os::unix::prelude::*;
25

36
use crate::ffi::{CStr, OsStr, OsString};
@@ -850,7 +853,6 @@ impl DirEntry {
850853
target_os = "fuchsia",
851854
target_os = "redox"
852855
)))]
853-
#[cfg_attr(miri, allow(unused))]
854856
fn name_cstr(&self) -> &CStr {
855857
unsafe { CStr::from_ptr(self.entry.d_name.as_ptr()) }
856858
}
@@ -862,7 +864,6 @@ impl DirEntry {
862864
target_os = "fuchsia",
863865
target_os = "redox"
864866
))]
865-
#[cfg_attr(miri, allow(unused))]
866867
fn name_cstr(&self) -> &CStr {
867868
&self.name
868869
}

0 commit comments

Comments
 (0)