about summary refs log tree commit diff
path: root/library/std/src/sys/unix/mod.rs
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2022-04-09 16:13:25 +0200
committerMara Bos <m-ou.se@m-ou.se>2022-04-12 08:44:39 +0200
commit8a2c9a96159fcca6d35efb94b900d8be79395ea9 (patch)
treee9d61040cfaba5ce7a0ca8ee4cfd73c806dcc3c8 /library/std/src/sys/unix/mod.rs
parent5b2591299a2c179301849e76cc137b0e39b68367 (diff)
downloadrust-8a2c9a96159fcca6d35efb94b900d8be79395ea9.tar.gz
rust-8a2c9a96159fcca6d35efb94b900d8be79395ea9.zip
Allow cvt_nz to be unused on some platforms.
Diffstat (limited to 'library/std/src/sys/unix/mod.rs')
-rw-r--r--library/std/src/sys/unix/mod.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/std/src/sys/unix/mod.rs b/library/std/src/sys/unix/mod.rs
index e65c11b6d09..3ad03a88681 100644
--- a/library/std/src/sys/unix/mod.rs
+++ b/library/std/src/sys/unix/mod.rs
@@ -215,6 +215,7 @@ where
     }
 }
 
+#[allow(dead_code)] // Not used on all platforms.
 pub fn cvt_nz(error: libc::c_int) -> crate::io::Result<()> {
     if error == 0 { Ok(()) } else { Err(crate::io::Error::from_raw_os_error(error)) }
 }