]> git.lizzy.rs Git - rust.git/commitdiff
Fix the fallout of removing feature(import_shadowing).
authorEduard Burtescu <edy.burt@gmail.com>
Mon, 15 Dec 2014 04:03:00 +0000 (06:03 +0200)
committerEduard Burtescu <edy.burt@gmail.com>
Sat, 20 Dec 2014 05:49:37 +0000 (07:49 +0200)
20 files changed:
src/libcollections/vec.rs
src/libcollections/vec_map.rs
src/librustc/middle/check_match.rs
src/librustc_borrowck/borrowck/move_data.rs
src/librustc_trans/trans/callee.rs
src/librustc_trans/trans/common.rs
src/librustc_trans/trans/controlflow.rs
src/librustc_trans/trans/meth.rs
src/libstd/dynamic_lib.rs
src/libstd/rt/util.rs
src/libstd/sys/common/mutex.rs
src/libstd/sys/unix/fs.rs
src/libstd/sys/unix/os.rs
src/libstd/sys/unix/tcp.rs
src/libstd/sys/windows/condvar.rs
src/libstd/sys/windows/fs.rs
src/libstd/sys/windows/os.rs
src/libstd/sys/windows/process.rs
src/libstd/sys/windows/tcp.rs
src/libstd/thread.rs

index e986b2044306f058291a07cb37d1aa01342a9743..a783d8e63390bc9b53e48e90e703d72fcb6ffaa4 100644 (file)
@@ -54,7 +54,6 @@
 use core::fmt;
 use core::hash::{mod, Hash};
 use core::kinds::marker::{ContravariantLifetime, InvariantType};
-use core::kinds::Sized;
 use core::mem;
 use core::num::{Int, UnsignedInt};
 use core::ops;
index 8faa9c1c522db18f1f9fc1a68a906afe99e2f16c..75b7c917ced58d902ee19dd3dfbcf1dd792cd557 100644 (file)
@@ -21,7 +21,6 @@
 use core::iter;
 use core::iter::{Enumerate, FilterMap, Map};
 use core::mem::replace;
-use core::ops::FnOnce;
 
 use {vec, slice};
 use vec::Vec;
index 79e776c330884fe44fd93367dff18bc9e50ecb87..2dc0d87c5469bd7c0fd8fc7a1298e04a426bc2b6 100644 (file)
@@ -22,7 +22,7 @@
 use middle::mem_categorization::cmt;
 use middle::pat_util::*;
 use middle::ty::*;
-use middle::ty::{mod, Ty};
+use middle::ty;
 use std::fmt;
 use std::iter::AdditiveIterator;
 use std::iter::range_inclusive;
index d033fd808aa40eadedd842cba911b42a4ebf529e..5d2faa52f1ad0f288b33031a1a8039decaf2df24 100644 (file)
@@ -14,8 +14,6 @@
 pub use self::MoveKind::*;
 
 use borrowck::*;
-use borrowck::LoanPathKind::{LpVar, LpUpvar, LpDowncast, LpExtend};
-use borrowck::LoanPathElem::{LpInterior};
 use rustc::middle::cfg;
 use rustc::middle::dataflow::DataFlowContext;
 use rustc::middle::dataflow::BitwiseOperator;
index 3376479b7a42dce40792de933778ba630150c132..1a753901f7ea4ca01133168aa7dd0168fe9bd71e 100644 (file)
@@ -487,7 +487,7 @@ pub fn trans_fn_ref_with_substs<'blk, 'tcx>(
 
         let opt_ref_id = match node {
             ExprId(id) => if id != 0 { Some(id) } else { None },
-            MethodCall(_) => None,
+            MethodCallKey(_) => None,
         };
 
         let (val, must_cast) =
@@ -498,7 +498,7 @@ pub fn trans_fn_ref_with_substs<'blk, 'tcx>(
             // are subst'd)
             let ref_ty = match node {
                 ExprId(id) => node_id_type(bcx, id),
-                MethodCall(method_call) => {
+                MethodCallKey(method_call) => {
                     let t = (*bcx.tcx().method_map.borrow())[method_call].ty;
                     monomorphize_type(bcx, t)
                 }
index 4dd4e27c9c0d4255dd052271fbebb39c87139e07..09a4bdcefc54a97f240fb1a00703b56a8f50197f 100644 (file)
@@ -867,7 +867,7 @@ pub enum ExprOrMethodCall {
     ExprId(ast::NodeId),
 
     // Type parameters for a method call like `a.foo::<int>()`
-    MethodCall(ty::MethodCall)
+    MethodCallKey(ty::MethodCall)
 }
 
 pub fn node_id_substs<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
@@ -879,7 +879,7 @@ pub fn node_id_substs<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
         ExprId(id) => {
             ty::node_id_item_substs(tcx, id).substs
         }
-        MethodCall(method_call) => {
+        MethodCallKey(method_call) => {
             (*tcx.method_map.borrow())[method_call].substs.clone()
         }
     };
index a1574aa2f0e4339eab45f4bc954a8af131a52ea7..211f8a1f4208fc663d81c8c76cf22b987c693eaf 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use llvm::*;
+use llvm::ValueRef;
 use middle::def;
 use middle::lang_items::{PanicFnLangItem, PanicBoundsCheckFnLangItem};
 use trans::_match;
index f1c3c9be396af0c93d7d4a17f729b51bf22080ea..15f6d7bc3f42d7d11b7ffe7b5b24cd9dc4480886 100644 (file)
@@ -124,7 +124,7 @@ pub fn trans_method_callee<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
                 bcx: bcx,
                 data: Fn(callee::trans_fn_ref(bcx,
                                               did,
-                                              MethodCall(method_call))),
+                                              MethodCallKey(method_call))),
             }
         }
 
@@ -344,12 +344,12 @@ fn trans_monomorphized_callee<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
             // those from the impl and those from the method:
             let callee_substs =
                 combine_impl_and_methods_tps(
-                    bcx, MethodCall(method_call), vtable_impl.substs);
+                    bcx, MethodCallKey(method_call), vtable_impl.substs);
 
             // translate the function
             let llfn = trans_fn_ref_with_substs(bcx,
                                                 mth_id,
-                                                MethodCall(method_call),
+                                                MethodCallKey(method_call),
                                                 callee_substs);
 
             Callee { bcx: bcx, data: Fn(llfn) }
@@ -359,7 +359,7 @@ fn trans_monomorphized_callee<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
             // after passing through fulfill_obligation
             let llfn = trans_fn_ref_with_substs(bcx,
                                                 closure_def_id,
-                                                MethodCall(method_call),
+                                                MethodCallKey(method_call),
                                                 substs);
 
             Callee {
index 291f384d619d9726adcc8bdf75eb4617959cc186..e520c70824e16c089da0053ea2a03ae5c9889bc3 100644 (file)
 #![experimental]
 #![allow(missing_docs)]
 
-use clone::Clone;
-use c_str::ToCStr;
-use iter::IteratorExt;
+use prelude::*;
 use mem;
-use ops::*;
-use option::*;
-use option::Option::{None, Some};
 use os;
-use path::{Path,GenericPath};
-use result::*;
-use result::Result::{Err, Ok};
-use slice::{AsSlice,SliceExt};
 use str;
-use string::String;
-use vec::Vec;
 
 #[allow(missing_copy_implementations)]
 pub struct DynamicLibrary {
@@ -213,13 +202,10 @@ fn test_errors_do_not_crash() {
 pub mod dl {
     pub use self::Rtld::*;
 
-    use c_str::{CString, ToCStr};
+    use prelude::*;
+    use c_str::CString;
     use libc;
-    use ops::FnOnce;
     use ptr;
-    use result::*;
-    use result::Result::{Err, Ok};
-    use string::String;
 
     pub unsafe fn open_external<T: ToCStr>(filename: T) -> *mut u8 {
         filename.with_c_str(|raw_name| {
index fa527a70f83958ee8fb3533a1f1ace2c6a60a6bb..77500ca74d092c628296e8f07557b241028adc73 100644 (file)
@@ -20,7 +20,6 @@
 
 use libc::{mod, uintptr_t};
 use os;
-use str::{FromStr, from_str, Str};
 use sync::atomic;
 
 /// Dynamically inquire about whether we're running under V.
@@ -66,7 +65,7 @@ pub fn min_stack() -> uint {
 pub fn default_sched_threads() -> uint {
     match os::getenv("RUST_THREADS") {
         Some(nstr) => {
-            let opt_n: Option<uint> = FromStr::from_str(nstr.as_slice());
+            let opt_n: Option<uint> = from_str(nstr.as_slice());
             match opt_n {
                 Some(n) if n > 0 => n,
                 _ => panic!("`RUST_THREADS` is `{}`, should be a positive integer", nstr)
index 117d33db32896a7b57c8b6a6fd0de03af8a43deb..1a8a92a105a777d9e055be230611c31146d48b59 100644 (file)
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-pub use sys::mutex::raw;
-
 use sys::mutex as imp;
 
 /// An OS-based mutual exclusion lock.
index 66f7d85f20dfb4e15cc2cdc2ba3f939ed77effae..98d860f964649bed70b2ec478abd401e0b3c0f0c 100644 (file)
 use prelude::*;
 
 use io::{FilePermission, Write, UnstableFileStat, Open, FileAccess, FileMode};
-use io::{IoResult, FileStat, SeekStyle, Reader};
+use io::{IoResult, FileStat, SeekStyle};
 use io::{Read, Truncate, SeekCur, SeekSet, ReadWrite, SeekEnd, Append};
-use result::Result::{Ok, Err};
 use sys::retry;
 use sys_common::{keep_going, eof, mkerr_libc};
 
-pub use path::PosixPath as Path;
-
 pub type fd_t = libc::c_int;
 
 pub struct FileDesc {
index 0ed079df55b353f79e882346738db8ddc56dd350..6c909d7562d9aa213f1e50cb57bd468f69cfab74 100644 (file)
@@ -16,8 +16,8 @@
 use fmt;
 use io::{IoError, IoResult};
 use libc::{mod, c_int, c_char, c_void};
-use path::{Path, GenericPath, BytesContainer};
-use ptr::{mod, RawPtr};
+use path::BytesContainer;
+use ptr;
 use sync::atomic::{AtomicInt, INIT_ATOMIC_INT, SeqCst};
 use sys::fs::FileDesc;
 use os;
index 00643ac0a79f259be77f10f9ca0bb66a04bdd985..dacd754582ba77f64546c16ce7d5f422454bd456 100644 (file)
@@ -20,7 +20,7 @@
 use sys::{set_nonblocking, wouldblock};
 use sys;
 use sys_common;
-use sys_common::net::*;
+use sys_common::net;
 
 pub use sys_common::net::TcpStream;
 
@@ -34,17 +34,19 @@ pub struct TcpListener {
 
 impl TcpListener {
     pub fn bind(addr: ip::SocketAddr) -> IoResult<TcpListener> {
-        let fd = try!(socket(addr, libc::SOCK_STREAM));
+        let fd = try!(net::socket(addr, libc::SOCK_STREAM));
         let ret = TcpListener { inner: FileDesc::new(fd, true) };
 
         let mut storage = unsafe { mem::zeroed() };
-        let len = addr_to_sockaddr(addr, &mut storage);
+        let len = net::addr_to_sockaddr(addr, &mut storage);
         let addrp = &storage as *const _ as *const libc::sockaddr;
 
         // On platforms with Berkeley-derived sockets, this allows
         // to quickly rebind a socket, without needing to wait for
         // the OS to clean up the previous one.
-        try!(setsockopt(fd, libc::SOL_SOCKET, libc::SO_REUSEADDR, 1 as libc::c_int));
+        try!(net::setsockopt(fd, libc::SOL_SOCKET,
+                             libc::SO_REUSEADDR,
+                             1 as libc::c_int));
 
 
         match unsafe { libc::bind(fd, addrp, len) } {
@@ -77,7 +79,7 @@ pub fn listen(self, backlog: int) -> IoResult<TcpAcceptor> {
     }
 
     pub fn socket_name(&mut self) -> IoResult<ip::SocketAddr> {
-        sockname(self.fd(), libc::getsockname)
+        net::sockname(self.fd(), libc::getsockname)
     }
 }
 
@@ -121,15 +123,15 @@ pub fn accept(&mut self) -> IoResult<TcpStream> {
                 -1 => return Err(last_net_error()),
                 fd => return Ok(TcpStream::new(fd as sock_t)),
             }
-            try!(await(&[self.fd(), self.inner.reader.fd()],
-                       deadline, Readable));
+            try!(net::await(&[self.fd(), self.inner.reader.fd()],
+                       deadline, net::Readable));
         }
 
         Err(sys_common::eof())
     }
 
     pub fn socket_name(&mut self) -> IoResult<ip::SocketAddr> {
-        sockname(self.fd(), libc::getsockname)
+        net::sockname(self.fd(), libc::getsockname)
     }
 
     pub fn set_timeout(&mut self, timeout: Option<u64>) {
index 3cabf3a63194cceee3f107bf0e2c76150568ea8e..7f9d669c44748ec5cacb2649a040c67f634f92f2 100644 (file)
@@ -10,7 +10,6 @@
 
 use cell::UnsafeCell;
 use libc::{mod, DWORD};
-use libc;
 use os;
 use sys::mutex::{mod, Mutex};
 use sys::sync as ffi;
index 0fb52c758d5db08063a57ab7e575357d2b37f52a..d5bf8c5b62916e581388fad172799c21e8edfa44 100644 (file)
 use sys_common::{keep_going, eof, mkerr_libc};
 
 use io::{FilePermission, Write, UnstableFileStat, Open, FileAccess, FileMode};
-use io::{IoResult, IoError, FileStat, SeekStyle, Seek, Writer, Reader};
+use io::{IoResult, IoError, FileStat, SeekStyle};
 use io::{Read, Truncate, SeekCur, SeekSet, ReadWrite, SeekEnd, Append};
 
-pub use path::WindowsPath as Path;
 pub type fd_t = libc::c_int;
 
 pub struct FileDesc {
index 2fbb9494c710bdba8d1eb57f14ceb352a60e8df9..e2220b7b67bbd6e5dbb5f50c78901c27a731f454 100644 (file)
 use libc::{c_int, c_char, c_void};
 use libc;
 use os;
-use path::{Path, GenericPath, BytesContainer};
-use ptr::{mod, RawPtr};
+use path::BytesContainer;
+use ptr;
 use sync::atomic::{AtomicInt, INIT_ATOMIC_INT, SeqCst};
 use sys::fs::FileDesc;
-use option::Option;
-use option::Option::{Some, None};
 use slice;
 
 use os::TMPBUF_SZ;
index bbfd32ee76bfab72b273127eacc9b88b7af24f72..8945c155e66cedeb6816cb7c652a38d345195d6d 100644 (file)
@@ -29,7 +29,6 @@
 use sys_common::{AsInner, mkerr_libc, timeout};
 
 use io::fs::PathExtensions;
-use string::String;
 
 pub use sys_common::ProcessConfig;
 
index b577372d2fc591ed1d3ff693a2eb789a8896c620..505e6137bf9047162416ccaa277497642224b030 100644 (file)
@@ -18,8 +18,7 @@
 use sync::{Arc, atomic};
 use sys::fs::FileDesc;
 use sys::{mod, c, set_nonblocking, wouldblock, timer};
-use sys_common::{mod, timeout, eof};
-use sys_common::net::*;
+use sys_common::{mod, timeout, eof, net};
 
 pub use sys_common::net::TcpStream;
 
@@ -54,11 +53,11 @@ impl TcpListener {
     pub fn bind(addr: ip::SocketAddr) -> IoResult<TcpListener> {
         sys::init_net();
 
-        let sock = try!(socket(addr, libc::SOCK_STREAM));
+        let sock = try!(net::socket(addr, libc::SOCK_STREAM));
         let ret = TcpListener { sock: sock };
 
         let mut storage = unsafe { mem::zeroed() };
-        let len = addr_to_sockaddr(addr, &mut storage);
+        let len = net::addr_to_sockaddr(addr, &mut storage);
         let addrp = &storage as *const _ as *const libc::sockaddr;
 
         match unsafe { libc::bind(sock, addrp, len) } {
@@ -95,7 +94,7 @@ pub fn listen(self, backlog: int) -> IoResult<TcpAcceptor> {
     }
 
     pub fn socket_name(&mut self) -> IoResult<ip::SocketAddr> {
-        sockname(self.socket(), libc::getsockname)
+        net::sockname(self.socket(), libc::getsockname)
     }
 }
 
@@ -195,7 +194,7 @@ pub fn accept(&mut self) -> IoResult<TcpStream> {
     }
 
     pub fn socket_name(&mut self) -> IoResult<ip::SocketAddr> {
-        sockname(self.socket(), libc::getsockname)
+        net::sockname(self.socket(), libc::getsockname)
     }
 
     pub fn set_timeout(&mut self, timeout: Option<u64>) {
index 8ef53a22aeb04c765f2ae6ecd2165df40ae054eb..ff9ee01b40ac82f7cc20c80fb34bb1c2549c252d 100644 (file)
 //!
 //! * It can be implemented highly efficiently on many platforms.
 
-use core::prelude::*;
-
 use any::Any;
 use borrow::IntoCow;
 use boxed::Box;
 use cell::UnsafeCell;
+use clone::Clone;
+use kinds::Send;
+use ops::{Drop, FnOnce};
+use option::Option::{mod, Some, None};
+use result::Result::{Err, Ok};
 use sync::{Mutex, Condvar, Arc};
+use str::Str;
 use string::String;
 use rt::{mod, unwind};
 use io::{Writer, stdio};