Skip to content

Commit

Permalink
Rollup merge of #103564 - RalfJung:miri-unused, r=thomcc
Browse files Browse the repository at this point in the history
library: allow some unused things in Miri

Should help for rust-lang/rust#102950.
  • Loading branch information
matthiaskrgr committed Oct 27, 2022
2 parents d005fa1 + ab3339a commit 303572e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions 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 303572e

Please sign in to comment.