about summary refs log tree commit diff
path: root/src/libnative
diff options
context:
space:
mode:
authorJakub Wieczorek <jakub@jakub.cc>2014-06-06 15:51:42 +0200
committerJakub Wieczorek <jakub@jakub.cc>2014-06-08 13:36:28 +0200
commitf7d86b2f4ace416a65e84603082c756b8b5dc43e (patch)
tree9c47bd9132d7f323bde048e1fe1998c2d5a01692 /src/libnative
parent0271224bdae26260ab498f47323997f9edb5879e (diff)
downloadrust-f7d86b2f4ace416a65e84603082c756b8b5dc43e.tar.gz
rust-f7d86b2f4ace416a65e84603082c756b8b5dc43e.zip
Remove the dead code identified by the new lint
Diffstat (limited to 'src/libnative')
-rw-r--r--src/libnative/io/mod.rs4
-rw-r--r--src/libnative/io/net.rs5
-rw-r--r--src/libnative/io/pipe_unix.rs5
3 files changed, 10 insertions, 4 deletions
diff --git a/src/libnative/io/mod.rs b/src/libnative/io/mod.rs
index 3b0dbe2d0dc..1ecf7e57023 100644
--- a/src/libnative/io/mod.rs
+++ b/src/libnative/io/mod.rs
@@ -152,13 +152,13 @@ fn keep_going(data: &[u8], f: |*u8, uint| -> i64) -> i64 {
 /// Implementation of rt::rtio's IoFactory trait to generate handles to the
 /// native I/O functionality.
 pub struct IoFactory {
-    cannot_construct_outside_of_this_module: ()
+    _cannot_construct_outside_of_this_module: ()
 }
 
 impl IoFactory {
     pub fn new() -> IoFactory {
         net::init();
-        IoFactory { cannot_construct_outside_of_this_module: () }
+        IoFactory { _cannot_construct_outside_of_this_module: () }
     }
 }
 
diff --git a/src/libnative/io/net.rs b/src/libnative/io/net.rs
index 24956e514ec..e7effbd6bdb 100644
--- a/src/libnative/io/net.rs
+++ b/src/libnative/io/net.rs
@@ -254,7 +254,10 @@ pub struct TcpStream {
 
 struct Inner {
     fd: sock_t,
-    lock: mutex::NativeMutex,
+
+    // Unused on Linux, where this lock is not necessary.
+    #[allow(dead_code)]
+    lock: mutex::NativeMutex
 }
 
 pub struct Guard<'a> {
diff --git a/src/libnative/io/pipe_unix.rs b/src/libnative/io/pipe_unix.rs
index 7a1134fbe59..1458b475ae9 100644
--- a/src/libnative/io/pipe_unix.rs
+++ b/src/libnative/io/pipe_unix.rs
@@ -58,7 +58,10 @@ fn addr_to_sockaddr_un(addr: &CString) -> IoResult<(libc::sockaddr_storage, uint
 
 struct Inner {
     fd: fd_t,
-    lock: mutex::NativeMutex,
+
+    // Unused on Linux, where this lock is not necessary.
+    #[allow(dead_code)]
+    lock: mutex::NativeMutex
 }
 
 impl Inner {