Skip to content

Commit 9cf2b93

Browse files
author
B I Mohammed Abbas
committed
Allow unused unsafe for vxworks target only
1 parent 31623a1 commit 9cf2b93

File tree

1 file changed

+2
-2
lines changed
  • library/std/src/sys/pal/unix

1 file changed

+2
-2
lines changed

library/std/src/sys/pal/unix/fd.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ impl FileDesc {
120120
(&mut me).read_to_end(buf)
121121
}
122122

123-
#[allow(unused_unsafe)]
123+
#[cfg_attr(target_os = "vxworks", allow(unused_unsafe))]
124124
pub fn read_at(&self, buf: &mut [u8], offset: u64) -> io::Result<usize> {
125125
#[cfg(not(any(
126126
all(target_os = "linux", not(target_env = "musl")),
@@ -314,7 +314,7 @@ impl FileDesc {
314314
cfg!(not(any(target_os = "espidf", target_os = "horizon", target_os = "vita")))
315315
}
316316

317-
#[allow(unused_unsafe)]
317+
#[cfg_attr(target_os = "vxworks", allow(unused_unsafe))]
318318
pub fn write_at(&self, buf: &[u8], offset: u64) -> io::Result<usize> {
319319
#[cfg(not(any(
320320
all(target_os = "linux", not(target_env = "musl")),

0 commit comments

Comments
 (0)