diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-03-09 20:04:35 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-03-12 10:23:27 -0700 |
| commit | c933d44f7bb908aa520250b608f85bfacfccc337 (patch) | |
| tree | 82cab26f340e4cfdc5d373d621fd77713f6c6d78 /src/libstd/sys/common/net.rs | |
| parent | 206ee0e8533dd3e1ee324da445e02ad79c51e849 (diff) | |
std: Remove #[allow] directives in sys modules
These were suppressing lots of interesting warnings! Turns out there was also quite a bit of dead code.
Diffstat (limited to 'src/libstd/sys/common/net.rs')
| -rw-r--r-- | src/libstd/sys/common/net.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstd/sys/common/net.rs b/src/libstd/sys/common/net.rs index 344645dfc1a..96b72b42e54 100644 --- a/src/libstd/sys/common/net.rs +++ b/src/libstd/sys/common/net.rs @@ -26,7 +26,9 @@ use str; use sys::{self, retry, c, sock_t, last_error, last_net_error, last_gai_error, close_sock, wrlen, msglen_t, os, wouldblock, set_nonblocking, timer, ms_to_timeval, decode_error_detailed}; -use sync::{Arc, Mutex, MutexGuard}; +use sync::{Arc, Mutex}; +#[cfg(not(target_os = "linux"))] +use sync::MutexGuard; use sys_common::{self, keep_going, short_write, timeout}; use cmp; use old_io; @@ -620,11 +622,13 @@ impl Drop for Inner { fn drop(&mut self) { unsafe { close_sock(self.fd); } } } +#[cfg(not(target_os = "linux"))] pub struct Guard<'a> { pub fd: sock_t, pub guard: MutexGuard<'a, ()>, } +#[cfg(not(target_os = "linux"))] #[unsafe_destructor] impl<'a> Drop for Guard<'a> { fn drop(&mut self) { |
