library: allow some unused things in Miri
This commit is contained in:
parent
a5406feb1c
commit
20ab57e582
@ -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::os::unix::prelude::*;
|
||||||
|
|
||||||
use crate::ffi::{CStr, OsStr, OsString};
|
use crate::ffi::{CStr, OsStr, OsString};
|
||||||
@ -850,7 +853,6 @@ impl DirEntry {
|
|||||||
target_os = "fuchsia",
|
target_os = "fuchsia",
|
||||||
target_os = "redox"
|
target_os = "redox"
|
||||||
)))]
|
)))]
|
||||||
#[cfg_attr(miri, allow(unused))]
|
|
||||||
fn name_cstr(&self) -> &CStr {
|
fn name_cstr(&self) -> &CStr {
|
||||||
unsafe { CStr::from_ptr(self.entry.d_name.as_ptr()) }
|
unsafe { CStr::from_ptr(self.entry.d_name.as_ptr()) }
|
||||||
}
|
}
|
||||||
@ -862,7 +864,6 @@ impl DirEntry {
|
|||||||
target_os = "fuchsia",
|
target_os = "fuchsia",
|
||||||
target_os = "redox"
|
target_os = "redox"
|
||||||
))]
|
))]
|
||||||
#[cfg_attr(miri, allow(unused))]
|
|
||||||
fn name_cstr(&self) -> &CStr {
|
fn name_cstr(&self) -> &CStr {
|
||||||
&self.name
|
&self.name
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user