Skip to content

Commit 8a29784

Browse files
authored
Rollup merge of rust-lang#103564 - RalfJung:miri-unused, r=thomcc
library: allow some unused things in Miri Should help for rust-lang#102950.
2 parents 2bd49c3 + 20ab57e commit 8a29784

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)