Skip to content

Commit

Permalink
silence some unused-fn warnings in miri std builds
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Aug 18, 2022
1 parent 8c8dc12 commit 438e49c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions library/std/src/sys/unix/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()) }
}
Expand All @@ -840,6 +841,7 @@ 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 438e49c

Please sign in to comment.