Skip to content

Commit 5193d54

Browse files
committed
Fix the fallout of removing feature(import_shadowing).
1 parent d5267d5 commit 5193d54

File tree

20 files changed

+41
-65
lines changed

20 files changed

+41
-65
lines changed

src/libcollections/vec.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ use core::default::Default;
5454
use core::fmt;
5555
use core::hash::{mod, Hash};
5656
use core::kinds::marker::{ContravariantLifetime, InvariantType};
57-
use core::kinds::Sized;
5857
use core::mem;
5958
use core::num::{Int, UnsignedInt};
6059
use core::ops;

src/libcollections/vec_map.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ use core::hash::{Hash, Writer};
2121
use core::iter;
2222
use core::iter::{Enumerate, FilterMap, Map};
2323
use core::mem::replace;
24-
use core::ops::FnOnce;
2524

2625
use {vec, slice};
2726
use vec::Vec;

src/librustc/middle/check_match.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use middle::expr_use_visitor as euv;
2222
use middle::mem_categorization::cmt;
2323
use middle::pat_util::*;
2424
use middle::ty::*;
25-
use middle::ty::{mod, Ty};
25+
use middle::ty;
2626
use std::fmt;
2727
use std::iter::AdditiveIterator;
2828
use std::iter::range_inclusive;

src/librustc_borrowck/borrowck/move_data.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
pub use self::MoveKind::*;
1515

1616
use borrowck::*;
17-
use borrowck::LoanPathKind::{LpVar, LpUpvar, LpDowncast, LpExtend};
18-
use borrowck::LoanPathElem::{LpInterior};
1917
use rustc::middle::cfg;
2018
use rustc::middle::dataflow::DataFlowContext;
2119
use rustc::middle::dataflow::BitwiseOperator;

src/librustc_trans/trans/callee.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ pub fn trans_fn_ref_with_substs<'blk, 'tcx>(
487487

488488
let opt_ref_id = match node {
489489
ExprId(id) => if id != 0 { Some(id) } else { None },
490-
MethodCall(_) => None,
490+
MethodCallKey(_) => None,
491491
};
492492

493493
let (val, must_cast) =
@@ -498,7 +498,7 @@ pub fn trans_fn_ref_with_substs<'blk, 'tcx>(
498498
// are subst'd)
499499
let ref_ty = match node {
500500
ExprId(id) => node_id_type(bcx, id),
501-
MethodCall(method_call) => {
501+
MethodCallKey(method_call) => {
502502
let t = (*bcx.tcx().method_map.borrow())[method_call].ty;
503503
monomorphize_type(bcx, t)
504504
}

src/librustc_trans/trans/common.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ pub enum ExprOrMethodCall {
867867
ExprId(ast::NodeId),
868868

869869
// Type parameters for a method call like `a.foo::<int>()`
870-
MethodCall(ty::MethodCall)
870+
MethodCallKey(ty::MethodCall)
871871
}
872872

873873
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>,
879879
ExprId(id) => {
880880
ty::node_id_item_substs(tcx, id).substs
881881
}
882-
MethodCall(method_call) => {
882+
MethodCallKey(method_call) => {
883883
(*tcx.method_map.borrow())[method_call].substs.clone()
884884
}
885885
};

src/librustc_trans/trans/controlflow.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use llvm::*;
11+
use llvm::ValueRef;
1212
use middle::def;
1313
use middle::lang_items::{PanicFnLangItem, PanicBoundsCheckFnLangItem};
1414
use trans::_match;

src/librustc_trans/trans/meth.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ pub fn trans_method_callee<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
124124
bcx: bcx,
125125
data: Fn(callee::trans_fn_ref(bcx,
126126
did,
127-
MethodCall(method_call))),
127+
MethodCallKey(method_call))),
128128
}
129129
}
130130

@@ -344,12 +344,12 @@ fn trans_monomorphized_callee<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
344344
// those from the impl and those from the method:
345345
let callee_substs =
346346
combine_impl_and_methods_tps(
347-
bcx, MethodCall(method_call), vtable_impl.substs);
347+
bcx, MethodCallKey(method_call), vtable_impl.substs);
348348

349349
// translate the function
350350
let llfn = trans_fn_ref_with_substs(bcx,
351351
mth_id,
352-
MethodCall(method_call),
352+
MethodCallKey(method_call),
353353
callee_substs);
354354

355355
Callee { bcx: bcx, data: Fn(llfn) }
@@ -359,7 +359,7 @@ fn trans_monomorphized_callee<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
359359
// after passing through fulfill_obligation
360360
let llfn = trans_fn_ref_with_substs(bcx,
361361
closure_def_id,
362-
MethodCall(method_call),
362+
MethodCallKey(method_call),
363363
substs);
364364

365365
Callee {

src/libstd/dynamic_lib.rs

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,10 @@
1515
#![experimental]
1616
#![allow(missing_docs)]
1717

18-
use clone::Clone;
19-
use c_str::ToCStr;
20-
use iter::IteratorExt;
18+
use prelude::*;
2119
use mem;
22-
use ops::*;
23-
use option::*;
24-
use option::Option::{None, Some};
2520
use os;
26-
use path::{Path,GenericPath};
27-
use result::*;
28-
use result::Result::{Err, Ok};
29-
use slice::{AsSlice,SliceExt};
3021
use str;
31-
use string::String;
32-
use vec::Vec;
3322

3423
#[allow(missing_copy_implementations)]
3524
pub struct DynamicLibrary {
@@ -213,13 +202,10 @@ mod test {
213202
pub mod dl {
214203
pub use self::Rtld::*;
215204

216-
use c_str::{CString, ToCStr};
205+
use prelude::*;
206+
use c_str::CString;
217207
use libc;
218-
use ops::FnOnce;
219208
use ptr;
220-
use result::*;
221-
use result::Result::{Err, Ok};
222-
use string::String;
223209

224210
pub unsafe fn open_external<T: ToCStr>(filename: T) -> *mut u8 {
225211
filename.with_c_str(|raw_name| {

src/libstd/rt/util.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ use core::str;
2020

2121
use libc::{mod, uintptr_t};
2222
use os;
23-
use str::{FromStr, from_str, Str};
2423
use sync::atomic;
2524

2625
/// Dynamically inquire about whether we're running under V.
@@ -66,7 +65,7 @@ pub fn min_stack() -> uint {
6665
pub fn default_sched_threads() -> uint {
6766
match os::getenv("RUST_THREADS") {
6867
Some(nstr) => {
69-
let opt_n: Option<uint> = FromStr::from_str(nstr.as_slice());
68+
let opt_n: Option<uint> = from_str(nstr.as_slice());
7069
match opt_n {
7170
Some(n) if n > 0 => n,
7271
_ => panic!("`RUST_THREADS` is `{}`, should be a positive integer", nstr)

src/libstd/sys/common/mutex.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
pub use sys::mutex::raw;
12-
1311
use sys::mutex as imp;
1412

1513
/// An OS-based mutual exclusion lock.

src/libstd/sys/unix/fs.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,11 @@ use io;
1818
use prelude::*;
1919

2020
use io::{FilePermission, Write, UnstableFileStat, Open, FileAccess, FileMode};
21-
use io::{IoResult, FileStat, SeekStyle, Reader};
21+
use io::{IoResult, FileStat, SeekStyle};
2222
use io::{Read, Truncate, SeekCur, SeekSet, ReadWrite, SeekEnd, Append};
23-
use result::Result::{Ok, Err};
2423
use sys::retry;
2524
use sys_common::{keep_going, eof, mkerr_libc};
2625

27-
pub use path::PosixPath as Path;
28-
2926
pub type fd_t = libc::c_int;
3027

3128
pub struct FileDesc {

src/libstd/sys/unix/os.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ use error::{FromError, Error};
1616
use fmt;
1717
use io::{IoError, IoResult};
1818
use libc::{mod, c_int, c_char, c_void};
19-
use path::{Path, GenericPath, BytesContainer};
20-
use ptr::{mod, RawPtr};
19+
use path::BytesContainer;
20+
use ptr;
2121
use sync::atomic::{AtomicInt, INIT_ATOMIC_INT, SeqCst};
2222
use sys::fs::FileDesc;
2323
use os;

src/libstd/sys/unix/tcp.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use sys::fs::FileDesc;
2020
use sys::{set_nonblocking, wouldblock};
2121
use sys;
2222
use sys_common;
23-
use sys_common::net::*;
23+
use sys_common::net;
2424

2525
pub use sys_common::net::TcpStream;
2626

@@ -34,17 +34,19 @@ pub struct TcpListener {
3434

3535
impl TcpListener {
3636
pub fn bind(addr: ip::SocketAddr) -> IoResult<TcpListener> {
37-
let fd = try!(socket(addr, libc::SOCK_STREAM));
37+
let fd = try!(net::socket(addr, libc::SOCK_STREAM));
3838
let ret = TcpListener { inner: FileDesc::new(fd, true) };
3939

4040
let mut storage = unsafe { mem::zeroed() };
41-
let len = addr_to_sockaddr(addr, &mut storage);
41+
let len = net::addr_to_sockaddr(addr, &mut storage);
4242
let addrp = &storage as *const _ as *const libc::sockaddr;
4343

4444
// On platforms with Berkeley-derived sockets, this allows
4545
// to quickly rebind a socket, without needing to wait for
4646
// the OS to clean up the previous one.
47-
try!(setsockopt(fd, libc::SOL_SOCKET, libc::SO_REUSEADDR, 1 as libc::c_int));
47+
try!(net::setsockopt(fd, libc::SOL_SOCKET,
48+
libc::SO_REUSEADDR,
49+
1 as libc::c_int));
4850

4951

5052
match unsafe { libc::bind(fd, addrp, len) } {
@@ -77,7 +79,7 @@ impl TcpListener {
7779
}
7880

7981
pub fn socket_name(&mut self) -> IoResult<ip::SocketAddr> {
80-
sockname(self.fd(), libc::getsockname)
82+
net::sockname(self.fd(), libc::getsockname)
8183
}
8284
}
8385

@@ -121,15 +123,15 @@ impl TcpAcceptor {
121123
-1 => return Err(last_net_error()),
122124
fd => return Ok(TcpStream::new(fd as sock_t)),
123125
}
124-
try!(await(&[self.fd(), self.inner.reader.fd()],
125-
deadline, Readable));
126+
try!(net::await(&[self.fd(), self.inner.reader.fd()],
127+
deadline, net::Readable));
126128
}
127129

128130
Err(sys_common::eof())
129131
}
130132

131133
pub fn socket_name(&mut self) -> IoResult<ip::SocketAddr> {
132-
sockname(self.fd(), libc::getsockname)
134+
net::sockname(self.fd(), libc::getsockname)
133135
}
134136

135137
pub fn set_timeout(&mut self, timeout: Option<u64>) {

src/libstd/sys/windows/condvar.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
use cell::UnsafeCell;
1212
use libc::{mod, DWORD};
13-
use libc;
1413
use os;
1514
use sys::mutex::{mod, Mutex};
1615
use sys::sync as ffi;

src/libstd/sys/windows/fs.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,9 @@ use sys;
2626
use sys_common::{keep_going, eof, mkerr_libc};
2727

2828
use io::{FilePermission, Write, UnstableFileStat, Open, FileAccess, FileMode};
29-
use io::{IoResult, IoError, FileStat, SeekStyle, Seek, Writer, Reader};
29+
use io::{IoResult, IoError, FileStat, SeekStyle};
3030
use io::{Read, Truncate, SeekCur, SeekSet, ReadWrite, SeekEnd, Append};
3131

32-
pub use path::WindowsPath as Path;
3332
pub type fd_t = libc::c_int;
3433

3534
pub struct FileDesc {

src/libstd/sys/windows/os.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,10 @@ use io::{IoResult, IoError};
2020
use libc::{c_int, c_char, c_void};
2121
use libc;
2222
use os;
23-
use path::{Path, GenericPath, BytesContainer};
24-
use ptr::{mod, RawPtr};
23+
use path::BytesContainer;
24+
use ptr;
2525
use sync::atomic::{AtomicInt, INIT_ATOMIC_INT, SeqCst};
2626
use sys::fs::FileDesc;
27-
use option::Option;
28-
use option::Option::{Some, None};
2927
use slice;
3028

3129
use os::TMPBUF_SZ;

src/libstd/sys/windows/process.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ use sys_common::helper_thread::Helper;
2929
use sys_common::{AsInner, mkerr_libc, timeout};
3030

3131
use io::fs::PathExtensions;
32-
use string::String;
3332

3433
pub use sys_common::ProcessConfig;
3534

src/libstd/sys/windows/tcp.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ use super::{last_error, last_net_error, retry, sock_t};
1818
use sync::{Arc, atomic};
1919
use sys::fs::FileDesc;
2020
use sys::{mod, c, set_nonblocking, wouldblock, timer};
21-
use sys_common::{mod, timeout, eof};
22-
use sys_common::net::*;
21+
use sys_common::{mod, timeout, eof, net};
2322

2423
pub use sys_common::net::TcpStream;
2524

@@ -54,11 +53,11 @@ impl TcpListener {
5453
pub fn bind(addr: ip::SocketAddr) -> IoResult<TcpListener> {
5554
sys::init_net();
5655

57-
let sock = try!(socket(addr, libc::SOCK_STREAM));
56+
let sock = try!(net::socket(addr, libc::SOCK_STREAM));
5857
let ret = TcpListener { sock: sock };
5958

6059
let mut storage = unsafe { mem::zeroed() };
61-
let len = addr_to_sockaddr(addr, &mut storage);
60+
let len = net::addr_to_sockaddr(addr, &mut storage);
6261
let addrp = &storage as *const _ as *const libc::sockaddr;
6362

6463
match unsafe { libc::bind(sock, addrp, len) } {
@@ -95,7 +94,7 @@ impl TcpListener {
9594
}
9695

9796
pub fn socket_name(&mut self) -> IoResult<ip::SocketAddr> {
98-
sockname(self.socket(), libc::getsockname)
97+
net::sockname(self.socket(), libc::getsockname)
9998
}
10099
}
101100

@@ -195,7 +194,7 @@ impl TcpAcceptor {
195194
}
196195

197196
pub fn socket_name(&mut self) -> IoResult<ip::SocketAddr> {
198-
sockname(self.socket(), libc::getsockname)
197+
net::sockname(self.socket(), libc::getsockname)
199198
}
200199

201200
pub fn set_timeout(&mut self, timeout: Option<u64>) {

src/libstd/thread.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,17 @@
124124
//!
125125
//! * It can be implemented highly efficiently on many platforms.
126126
127-
use core::prelude::*;
128-
129127
use any::Any;
130128
use borrow::IntoCow;
131129
use boxed::Box;
132130
use cell::UnsafeCell;
131+
use clone::Clone;
132+
use kinds::Send;
133+
use ops::{Drop, FnOnce};
134+
use option::Option::{mod, Some, None};
135+
use result::Result::{Err, Ok};
133136
use sync::{Mutex, Condvar, Arc};
137+
use str::Str;
134138
use string::String;
135139
use rt::{mod, unwind};
136140
use io::{Writer, stdio};

0 commit comments

Comments
 (0)