diff --git a/src/libcore/rt/uvio.rs b/src/libcore/rt/uvio.rs index 7bf1792baf49b..abdd8d6619a8a 100644 --- a/src/libcore/rt/uvio.rs +++ b/src/libcore/rt/uvio.rs @@ -11,7 +11,7 @@ use option::*; use result::*; -use super::io::net::ip::{IpAddr, Ipv4}; // n.b. Ipv4 is used only in tests +use super::io::net::ip::IpAddr; use super::uv::*; use super::rtio::*; use ops::Drop; @@ -19,6 +19,7 @@ use cell::{Cell, empty_cell}; use cast::transmute; use super::sched::{Scheduler, local_sched}; +#[cfg(test)] use super::io::net::ip::Ipv4; #[cfg(test)] use super::sched::Task; #[cfg(test)] use unstable::run_in_bare_thread; #[cfg(test)] use uint; diff --git a/src/libcore/str/ascii.rs b/src/libcore/str/ascii.rs index 339274ab47e4f..f6c0176eafc63 100644 --- a/src/libcore/str/ascii.rs +++ b/src/libcore/str/ascii.rs @@ -196,6 +196,7 @@ impl ToStrConsume for ~[Ascii] { } } +#[cfg(test)] mod tests { use super::*; diff --git a/src/librustc/back/link.rs b/src/librustc/back/link.rs index 99ea0bc0c865e..8befa4c82031a 100644 --- a/src/librustc/back/link.rs +++ b/src/librustc/back/link.rs @@ -26,7 +26,7 @@ use core::char; use core::hash::Streaming; use core::hash; use core::io::WriterUtil; -use core::libc::{c_int, c_uint, c_char}; +use core::libc::{c_int, c_uint}; use core::os::consts::{macos, freebsd, linux, android, win32}; use core::os; use core::ptr; diff --git a/src/librustc/middle/trans/base.rs b/src/librustc/middle/trans/base.rs index 68405f4fc5fe2..da87568b3d0c0 100644 --- a/src/librustc/middle/trans/base.rs +++ b/src/librustc/middle/trans/base.rs @@ -70,7 +70,7 @@ use core::hash; use core::hashmap::{HashMap, HashSet}; use core::int; use core::io; -use core::libc::{c_uint, c_ulonglong}; +use core::libc::c_uint; use core::uint; use std::time; use syntax::ast::ident; diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs index b487fedf01dbb..47c9c3bdb6be4 100644 --- a/src/librustc/middle/ty.rs +++ b/src/librustc/middle/ty.rs @@ -514,7 +514,7 @@ pub struct substs { } mod primitives { - use super::{sty, t_box_}; + use super::t_box_; use syntax::ast;