Skip to content

Commit

Permalink
library: allow some unused things in Miri
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Oct 26, 2022
1 parent a5406fe commit 20ab57e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions library/std/src/sys/unix/fs.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// miri has some special hacks here that make things unused.
#![cfg_attr(miri, allow(unused))]

use crate::os::unix::prelude::*;

use crate::ffi::{CStr, OsStr, OsString};
Expand Down Expand Up @@ -850,7 +853,6 @@ 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()) }
}
Expand All @@ -862,7 +864,6 @@ impl DirEntry {
target_os = "fuchsia",
target_os = "redox"
))]
#[cfg_attr(miri, allow(unused))]
fn name_cstr(&self) -> &CStr {
&self.name
}
Expand Down

0 comments on commit 20ab57e

Please sign in to comment.