]> git.lizzy.rs Git - rust.git/commitdiff
rollup merge of #23749: alexcrichton/remove-old-impl-check
authorAlex Crichton <alex@alexcrichton.com>
Fri, 27 Mar 2015 17:10:38 +0000 (10:10 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Fri, 27 Mar 2015 17:10:38 +0000 (10:10 -0700)
Conflicts:
src/libsyntax/feature_gate.rs

1  2 
src/libstd/lib.rs
src/libstd/old_io/mod.rs
src/libstd/old_io/net/pipe.rs
src/libstd/old_io/net/tcp.rs
src/libstd/old_io/result.rs
src/libsyntax/feature_gate.rs

diff --combined src/libstd/lib.rs
index 10050d0bb4fbee3edf4f2186b17cd4a623326733,c2d49810d593a71215dda5df057f851b48604631..420f6c49c266c8dfc75b9c799a71aa236081285c
@@@ -67,8 -67,9 +67,8 @@@
  //! module encapsulates the platform-specific rules for dealing
  //! with file paths.
  //!
 -//! `std` also includes modules for interoperating with the
 -//! C language: [`c_str`](c_str/index.html) and
 -//! [`c_vec`](c_vec/index.html).
 +//! `std` also includes the [`ffi`](ffi/index.html) module for interoperating
 +//! with the C language.
  //!
  //! ## Concurrency, I/O, and the runtime
  //!
  #![feature(lang_items)]
  #![feature(libc)]
  #![feature(linkage, thread_local, asm)]
- #![feature(old_impl_check)]
  #![feature(optin_builtin_traits)]
  #![feature(rand)]
  #![feature(staged_api)]
  #![feature(unboxed_closures)]
  #![feature(unicode)]
  #![feature(unsafe_destructor)]
 -#![feature(unsafe_no_drop_flag)]
 +#![feature(unsafe_no_drop_flag, filling_drop)]
  #![feature(macro_reexport)]
 -#![feature(int_uint)]
  #![feature(unique)]
  #![feature(convert)]
  #![feature(allow_internal_unstable)]
  #![no_std]
  
  #![allow(trivial_casts)]
 -#![allow(trivial_numeric_casts)]
  #![deny(missing_docs)]
  
  #[cfg(test)] extern crate test;
@@@ -146,9 -148,9 +145,9 @@@ extern crate core
  
  #[macro_use]
  #[macro_reexport(vec, format)]
 -extern crate "collections" as core_collections;
 +extern crate collections as core_collections;
  
 -#[allow(deprecated)] extern crate "rand" as core_rand;
 +#[allow(deprecated)] extern crate rand as core_rand;
  extern crate alloc;
  extern crate unicode;
  extern crate libc;
  #[macro_use] #[no_link] extern crate rustc_bitflags;
  
  // Make std testable by not duplicating lang items. See #2912
 -#[cfg(test)] extern crate "std" as realstd;
 +#[cfg(test)] extern crate std as realstd;
  #[cfg(test)] pub use realstd::marker;
  #[cfg(test)] pub use realstd::ops;
  #[cfg(test)] pub use realstd::cmp;
diff --combined src/libstd/old_io/mod.rs
index 1bbd602b18af479d4e06303eabbda988c1de197d,3d318d97da7f6ade24360429d7a18e460121bdf6..aaa55c5d1d9b9eba876ea1aa10773ffbd799b556
@@@ -326,7 -326,7 +326,7 @@@ pub mod test
  /// The default buffer size for various I/O operations
  // libuv recommends 64k buffers to maximize throughput
  // https://groups.google.com/forum/#!topic/libuv/oQO1HJAIDdA
 -const DEFAULT_BUF_SIZE: uint = 1024 * 64;
 +const DEFAULT_BUF_SIZE: usize = 1024 * 64;
  
  /// A convenient typedef of the return value of any I/O action.
  pub type IoResult<T> = Result<T, IoError>;
@@@ -441,7 -441,7 +441,7 @@@ pub enum IoErrorKind 
      ///
      /// The payload contained as part of this variant is the number of bytes
      /// which are known to have been successfully written.
 -    ShortWrite(uint),
 +    ShortWrite(usize),
      /// The Reader returned 0 bytes from `read()` too many times.
      NoProgress,
  }
@@@ -483,7 -483,7 +483,7 @@@ impl<T> UpdateIoError for IoResult<T> 
      }
  }
  
 -static NO_PROGRESS_LIMIT: uint = 1000;
 +static NO_PROGRESS_LIMIT: usize = 1000;
  
  /// A trait for objects which are byte-oriented streams. Readers are defined by
  /// one method, `read`. This function will block until data is available,
@@@ -511,7 -511,7 +511,7 @@@ pub trait Reader 
      ///
      /// When implementing this method on a new Reader, you are strongly encouraged
      /// not to return 0 if you can avoid it.
 -    fn read(&mut self, buf: &mut [u8]) -> IoResult<uint>;
 +    fn read(&mut self, buf: &mut [u8]) -> IoResult<usize>;
  
      // Convenient helper methods based on the above methods
  
      ///
      /// If an error occurs at any point, that error is returned, and no further
      /// bytes are read.
 -    fn read_at_least(&mut self, min: uint, buf: &mut [u8]) -> IoResult<uint> {
 +    fn read_at_least(&mut self, min: usize, buf: &mut [u8]) -> IoResult<usize> {
          if min > buf.len() {
              return Err(IoError {
                  detail: Some(String::from_str("the buffer is too short")),
      ///
      /// If an error occurs during this I/O operation, then it is returned
      /// as `Err(IoError)`. See `read()` for more details.
 -    fn push(&mut self, len: uint, buf: &mut Vec<u8>) -> IoResult<uint> {
 +    fn push(&mut self, len: usize, buf: &mut Vec<u8>) -> IoResult<usize> {
          let start_len = buf.len();
          buf.reserve(len);
  
      ///
      /// If an error occurs at any point, that error is returned, and no further
      /// bytes are read.
 -    fn push_at_least(&mut self, min: uint, len: uint, buf: &mut Vec<u8>) -> IoResult<uint> {
 +    fn push_at_least(&mut self, min: usize, len: usize, buf: &mut Vec<u8>) -> IoResult<usize> {
          if min > len {
              return Err(IoError {
                  detail: Some(String::from_str("the buffer is too short")),
      /// have already been consumed from the underlying reader, and they are lost
      /// (not returned as part of the error). If this is unacceptable, then it is
      /// recommended to use the `push_at_least` or `read` methods.
 -    fn read_exact(&mut self, len: uint) -> IoResult<Vec<u8>> {
 +    fn read_exact(&mut self, len: usize) -> IoResult<Vec<u8>> {
          let mut buf = Vec::with_capacity(len);
          match self.push_at_least(len, len, &mut buf) {
              Ok(_) => Ok(buf),
      /// Reads `n` little-endian unsigned integer bytes.
      ///
      /// `n` must be between 1 and 8, inclusive.
 -    fn read_le_uint_n(&mut self, nbytes: uint) -> IoResult<u64> {
 +    fn read_le_uint_n(&mut self, nbytes: usize) -> IoResult<u64> {
          assert!(nbytes > 0 && nbytes <= 8);
  
          let mut val = 0;
      /// Reads `n` little-endian signed integer bytes.
      ///
      /// `n` must be between 1 and 8, inclusive.
 -    fn read_le_int_n(&mut self, nbytes: uint) -> IoResult<i64> {
 +    fn read_le_int_n(&mut self, nbytes: usize) -> IoResult<i64> {
          self.read_le_uint_n(nbytes).map(|i| extend_sign(i, nbytes))
      }
  
      /// Reads `n` big-endian unsigned integer bytes.
      ///
      /// `n` must be between 1 and 8, inclusive.
 -    fn read_be_uint_n(&mut self, nbytes: uint) -> IoResult<u64> {
 +    fn read_be_uint_n(&mut self, nbytes: usize) -> IoResult<u64> {
          assert!(nbytes > 0 && nbytes <= 8);
  
          let mut val = 0;
      /// Reads `n` big-endian signed integer bytes.
      ///
      /// `n` must be between 1 and 8, inclusive.
 -    fn read_be_int_n(&mut self, nbytes: uint) -> IoResult<i64> {
 +    fn read_be_int_n(&mut self, nbytes: usize) -> IoResult<i64> {
          self.read_be_uint_n(nbytes).map(|i| extend_sign(i, nbytes))
      }
  
      /// Reads a little-endian unsigned integer.
      ///
      /// The number of bytes returned is system-dependent.
 -    fn read_le_uint(&mut self) -> IoResult<uint> {
 -        self.read_le_uint_n(usize::BYTES as usize).map(|i| i as uint)
 +    fn read_le_uint(&mut self) -> IoResult<usize> {
 +        self.read_le_uint_n(usize::BYTES as usize).map(|i| i as usize)
      }
  
      /// Reads a little-endian integer.
      ///
      /// The number of bytes returned is system-dependent.
 -    fn read_le_int(&mut self) -> IoResult<int> {
 -        self.read_le_int_n(isize::BYTES as usize).map(|i| i as int)
 +    fn read_le_int(&mut self) -> IoResult<isize> {
 +        self.read_le_int_n(isize::BYTES as usize).map(|i| i as isize)
      }
  
      /// Reads a big-endian unsigned integer.
      ///
      /// The number of bytes returned is system-dependent.
 -    fn read_be_uint(&mut self) -> IoResult<uint> {
 -        self.read_be_uint_n(usize::BYTES as usize).map(|i| i as uint)
 +    fn read_be_uint(&mut self) -> IoResult<usize> {
 +        self.read_be_uint_n(usize::BYTES as usize).map(|i| i as usize)
      }
  
      /// Reads a big-endian integer.
      ///
      /// The number of bytes returned is system-dependent.
 -    fn read_be_int(&mut self) -> IoResult<int> {
 -        self.read_be_int_n(isize::BYTES as usize).map(|i| i as int)
 +    fn read_be_int(&mut self) -> IoResult<isize> {
 +        self.read_be_int_n(isize::BYTES as usize).map(|i| i as isize)
      }
  
      /// Reads a big-endian `u64`.
@@@ -919,14 -919,14 +919,14 @@@ impl<T: Reader> BytesReader for T 
  }
  
  impl<'a> Reader for Box<Reader+'a> {
 -    fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
 +    fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> {
          let reader: &mut Reader = &mut **self;
          reader.read(buf)
      }
  }
  
  impl<'a> Reader for &'a mut (Reader+'a) {
 -    fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> { (*self).read(buf) }
 +    fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> { (*self).read(buf) }
  }
  
  /// Returns a slice of `v` between `start` and `end`.
  /// `start` > `end`.
  // Private function here because we aren't sure if we want to expose this as
  // API yet. If so, it should be a method on Vec.
 -unsafe fn slice_vec_capacity<'a, T>(v: &'a mut Vec<T>, start: uint, end: uint) -> &'a mut [T] {
 +unsafe fn slice_vec_capacity<'a, T>(v: &'a mut Vec<T>, start: usize, end: usize) -> &'a mut [T] {
      use slice;
  
      assert!(start <= end);
      assert!(end <= v.capacity());
      slice::from_raw_parts_mut(
 -        v.as_mut_ptr().offset(start as int),
 +        v.as_mut_ptr().offset(start as isize),
          end - start
      )
  }
@@@ -980,15 -980,15 +980,15 @@@ pub struct RefReader<'a, R:'a> 
  }
  
  impl<'a, R: Reader> Reader for RefReader<'a, R> {
 -    fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> { self.inner.read(buf) }
 +    fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> { self.inner.read(buf) }
  }
  
  impl<'a, R: Buffer> Buffer for RefReader<'a, R> {
      fn fill_buf(&mut self) -> IoResult<&[u8]> { self.inner.fill_buf() }
 -    fn consume(&mut self, amt: uint) { self.inner.consume(amt) }
 +    fn consume(&mut self, amt: usize) { self.inner.consume(amt) }
  }
  
 -fn extend_sign(val: u64, nbytes: uint) -> i64 {
 +fn extend_sign(val: u64, nbytes: usize) -> i64 {
      let shift = (8 - nbytes) * 8;
      (val << shift) as i64 >> shift
  }
@@@ -1095,39 -1095,39 +1095,39 @@@ pub trait Writer 
          self.write_all(&buf[..n])
      }
  
 -    /// Write the result of passing n through `int::to_str_bytes`.
 +    /// Write the result of passing n through `isize::to_str_bytes`.
      #[inline]
 -    fn write_int(&mut self, n: int) -> IoResult<()> {
 +    fn write_int(&mut self, n: isize) -> IoResult<()> {
          write!(self, "{}", n)
      }
  
 -    /// Write the result of passing n through `uint::to_str_bytes`.
 +    /// Write the result of passing n through `usize::to_str_bytes`.
      #[inline]
 -    fn write_uint(&mut self, n: uint) -> IoResult<()> {
 +    fn write_uint(&mut self, n: usize) -> IoResult<()> {
          write!(self, "{}", n)
      }
  
 -    /// Write a little-endian uint (number of bytes depends on system).
 +    /// Write a little-endian usize (number of bytes depends on system).
      #[inline]
 -    fn write_le_uint(&mut self, n: uint) -> IoResult<()> {
 +    fn write_le_uint(&mut self, n: usize) -> IoResult<()> {
          extensions::u64_to_le_bytes(n as u64, usize::BYTES as usize, |v| self.write_all(v))
      }
  
 -    /// Write a little-endian int (number of bytes depends on system).
 +    /// Write a little-endian isize (number of bytes depends on system).
      #[inline]
 -    fn write_le_int(&mut self, n: int) -> IoResult<()> {
 +    fn write_le_int(&mut self, n: isize) -> IoResult<()> {
          extensions::u64_to_le_bytes(n as u64, isize::BYTES as usize, |v| self.write_all(v))
      }
  
 -    /// Write a big-endian uint (number of bytes depends on system).
 +    /// Write a big-endian usize (number of bytes depends on system).
      #[inline]
 -    fn write_be_uint(&mut self, n: uint) -> IoResult<()> {
 +    fn write_be_uint(&mut self, n: usize) -> IoResult<()> {
          extensions::u64_to_be_bytes(n as u64, usize::BYTES as usize, |v| self.write_all(v))
      }
  
 -    /// Write a big-endian int (number of bytes depends on system).
 +    /// Write a big-endian isize (number of bytes depends on system).
      #[inline]
 -    fn write_be_int(&mut self, n: int) -> IoResult<()> {
 +    fn write_be_int(&mut self, n: isize) -> IoResult<()> {
          extensions::u64_to_be_bytes(n as u64, isize::BYTES as usize, |v| self.write_all(v))
      }
  
@@@ -1409,7 -1409,7 +1409,7 @@@ pub trait Buffer: Reader 
  
      /// Tells this buffer that `amt` bytes have been consumed from the buffer,
      /// so they should no longer be returned in calls to `read`.
 -    fn consume(&mut self, amt: uint);
 +    fn consume(&mut self, amt: usize);
  
      /// Reads the next line of input, interpreted as a sequence of UTF-8
      /// encoded Unicode codepoints. If a newline is encountered, then the
@@@ -1588,9 -1588,7 +1588,7 @@@ pub trait Seek 
  /// connections.
  ///
  /// Doing so produces some sort of Acceptor.
- pub trait Listener<T, A: Acceptor<T>>
-     : PhantomFn<T,T> // FIXME should be an assoc type anyhow
- {
+ pub trait Listener<A: Acceptor> {
      /// Spin up the listener and start queuing incoming connections
      ///
      /// # Error
  }
  
  /// An acceptor is a value that presents incoming connections
- pub trait Acceptor<T> {
+ pub trait Acceptor {
+     /// Type of connection that is accepted by this acceptor.
+     type Connection;
      /// Wait for and accept an incoming connection
      ///
      /// # Error
      ///
      /// Returns `Err` if an I/O error is encountered.
-     fn accept(&mut self) -> IoResult<T>;
+     fn accept(&mut self) -> IoResult<Self::Connection>;
  
      /// Create an iterator over incoming connection attempts.
      ///
@@@ -1628,11 -1629,10 +1629,10 @@@ pub struct IncomingConnections<'a, A: ?
      inc: &'a mut A,
  }
  
- #[old_impl_check]
- impl<'a, T, A: ?Sized + Acceptor<T>> Iterator for IncomingConnections<'a, A> {
-     type Item = IoResult<T>;
+ impl<'a, A: ?Sized + Acceptor> Iterator for IncomingConnections<'a, A> {
+     type Item = IoResult<A::Connection>;
  
-     fn next(&mut self) -> Option<IoResult<T>> {
+     fn next(&mut self) -> Option<IoResult<A::Connection>> {
          Some(self.inc.accept())
      }
  }
@@@ -1870,8 -1870,8 +1870,8 @@@ mod tests 
  
      #[derive(Clone, PartialEq, Debug)]
      enum BadReaderBehavior {
 -        GoodBehavior(uint),
 -        BadBehavior(uint)
 +        GoodBehavior(usize),
 +        BadBehavior(usize)
      }
  
      struct BadReader<T> {
      }
  
      impl<T: Reader> Reader for BadReader<T> {
 -        fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
 +        fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> {
              let BadReader { ref mut behavior, ref mut r } = *self;
              loop {
                  if behavior.is_empty() {
index 2f3cf3d84d092680798917090e2e562e84bf7f21,d2e6aa896d3f960afafba0b982bd9acac6b78f68..3a071e832af64baa01133cc934eb18ae775becd2
@@@ -150,7 -150,7 +150,7 @@@ impl Clone for UnixStream 
  }
  
  impl Reader for UnixStream {
 -    fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
 +    fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> {
          self.inner.read(buf)
      }
  }
@@@ -202,7 -202,7 +202,7 @@@ impl UnixListener 
      }
  }
  
- impl Listener<UnixStream, UnixAcceptor> for UnixListener {
+ impl Listener<UnixAcceptor> for UnixListener {
      fn listen(self) -> IoResult<UnixAcceptor> {
          self.inner.listen()
              .map(|inner| UnixAcceptor { inner: inner })
@@@ -250,7 -250,8 +250,8 @@@ impl UnixAcceptor 
      }
  }
  
- impl Acceptor<UnixStream> for UnixAcceptor {
+ impl Acceptor for UnixAcceptor {
+     type Connection = UnixStream;
      fn accept(&mut self) -> IoResult<UnixStream> {
          self.inner.accept().map(|s| {
              UnixStream { inner: s }
index d55d9ca11d14cf5391392ef89e5acb3be9c35166,67a6e2c29b46627a33b6593511c7028a94714f28..7fc460c16efca2454a61b7e48bb5d606c62741cf
@@@ -122,7 -122,7 +122,7 @@@ impl TcpStream 
      /// this connection. Otherwise, the keepalive timeout will be set to the
      /// specified time, in seconds.
      #[unstable(feature = "io")]
 -    pub fn set_keepalive(&mut self, delay_in_seconds: Option<uint>) -> IoResult<()> {
 +    pub fn set_keepalive(&mut self, delay_in_seconds: Option<usize>) -> IoResult<()> {
          self.inner.set_keepalive(delay_in_seconds)
      }
  
@@@ -257,7 -257,7 +257,7 @@@ impl Clone for TcpStream 
  }
  
  impl Reader for TcpStream {
 -    fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
 +    fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> {
          self.inner.read(buf)
      }
  }
@@@ -338,7 -338,7 +338,7 @@@ impl TcpListener 
      }
  }
  
- impl Listener<TcpStream, TcpAcceptor> for TcpListener {
+ impl Listener<TcpAcceptor> for TcpListener {
      fn listen(self) -> IoResult<TcpAcceptor> {
          self.inner.listen(128).map(|a| TcpAcceptor { inner: a })
      }
@@@ -453,7 -453,8 +453,8 @@@ impl TcpAcceptor 
      }
  }
  
- impl Acceptor<TcpStream> for TcpAcceptor {
+ impl Acceptor for TcpAcceptor {
+     type Connection = TcpStream;
      fn accept(&mut self) -> IoResult<TcpStream> {
          self.inner.accept().map(TcpStream::new)
      }
@@@ -789,12 -790,12 +790,12 @@@ mod test 
      #[test]
      fn multiple_connect_interleaved_greedy_schedule_ip4() {
          let addr = next_test_ip4();
 -        static MAX: int = 10;
 +        static MAX: isize = 10;
          let acceptor = TcpListener::bind(addr).listen();
  
          let _t = thread::spawn(move|| {
              let mut acceptor = acceptor;
 -            for (i, stream) in acceptor.incoming().enumerate().take(MAX as uint) {
 +            for (i, stream) in acceptor.incoming().enumerate().take(MAX as usize) {
                  // Start another task to handle the connection
                  let _t = thread::spawn(move|| {
                      let mut stream = stream;
  
          connect(0, addr);
  
 -        fn connect(i: int, addr: SocketAddr) {
 +        fn connect(i: isize, addr: SocketAddr) {
              if i == MAX { return }
  
              let _t = thread::spawn(move|| {
      #[test]
      fn multiple_connect_interleaved_greedy_schedule_ip6() {
          let addr = next_test_ip6();
 -        static MAX: int = 10;
 +        static MAX: isize = 10;
          let acceptor = TcpListener::bind(addr).listen();
  
          let _t = thread::spawn(move|| {
              let mut acceptor = acceptor;
 -            for (i, stream) in acceptor.incoming().enumerate().take(MAX as uint) {
 +            for (i, stream) in acceptor.incoming().enumerate().take(MAX as usize) {
                  // Start another task to handle the connection
                  let _t = thread::spawn(move|| {
                      let mut stream = stream;
  
          connect(0, addr);
  
 -        fn connect(i: int, addr: SocketAddr) {
 +        fn connect(i: isize, addr: SocketAddr) {
              if i == MAX { return }
  
              let _t = thread::spawn(move|| {
  
      #[test]
      fn multiple_connect_interleaved_lazy_schedule_ip4() {
 -        static MAX: int = 10;
 +        static MAX: isize = 10;
          let addr = next_test_ip4();
          let acceptor = TcpListener::bind(addr).listen();
  
          let _t = thread::spawn(move|| {
              let mut acceptor = acceptor;
 -            for stream in acceptor.incoming().take(MAX as uint) {
 +            for stream in acceptor.incoming().take(MAX as usize) {
                  // Start another task to handle the connection
                  let _t = thread::spawn(move|| {
                      let mut stream = stream;
  
          connect(0, addr);
  
 -        fn connect(i: int, addr: SocketAddr) {
 +        fn connect(i: isize, addr: SocketAddr) {
              if i == MAX { return }
  
              let _t = thread::spawn(move|| {
  
      #[test]
      fn multiple_connect_interleaved_lazy_schedule_ip6() {
 -        static MAX: int = 10;
 +        static MAX: isize = 10;
          let addr = next_test_ip6();
          let acceptor = TcpListener::bind(addr).listen();
  
          let _t = thread::spawn(move|| {
              let mut acceptor = acceptor;
 -            for stream in acceptor.incoming().take(MAX as uint) {
 +            for stream in acceptor.incoming().take(MAX as usize) {
                  // Start another task to handle the connection
                  let _t = thread::spawn(move|| {
                      let mut stream = stream;
  
          connect(0, addr);
  
 -        fn connect(i: int, addr: SocketAddr) {
 +        fn connect(i: isize, addr: SocketAddr) {
              if i == MAX { return }
  
              let _t = thread::spawn(move|| {
index cda19f8ae84669cc4abd3de56b219100590f6a06,29ebfb229bb3bb42a65d2e36a22cde40de3c8d39..e1037f26b7fcf575bf61f50a0905745125ceb6da
@@@ -35,7 -35,7 +35,7 @@@ impl<W: Writer> Writer for IoResult<W> 
  }
  
  impl<R: Reader> Reader for IoResult<R> {
 -    fn read(&mut self, buf: &mut [u8]) -> IoResult<uint> {
 +    fn read(&mut self, buf: &mut [u8]) -> IoResult<usize> {
          match *self {
              Ok(ref mut reader) => reader.read(buf),
              Err(ref e) => Err(e.clone()),
@@@ -58,7 -58,7 +58,7 @@@ impl<S: Seek> Seek for IoResult<S> 
      }
  }
  
- impl<T, A: Acceptor<T>, L: Listener<T, A>> Listener<T, A> for IoResult<L> {
+ impl<A: Acceptor, L: Listener<A>> Listener<A> for IoResult<L> {
      fn listen(self) -> IoResult<A> {
          match self {
              Ok(listener) => listener.listen(),
@@@ -67,8 -67,9 +67,9 @@@
      }
  }
  
- impl<T, A: Acceptor<T>> Acceptor<T> for IoResult<A> {
-     fn accept(&mut self) -> IoResult<T> {
+ impl<A: Acceptor> Acceptor for IoResult<A> {
+     type Connection = A::Connection;
+     fn accept(&mut self) -> IoResult<A::Connection> {
          match *self {
              Ok(ref mut acceptor) => acceptor.accept(),
              Err(ref e) => Err(e.clone()),
index ad0fa500c2875ddb15f879e2a29496cc3b708b07,0f281c6f8f9bd8551331fd98d1b3444e8f265e80..70f43776ff0c1ad6b3eed77777701e870ffa30b6
@@@ -54,6 -54,7 +54,6 @@@ const KNOWN_FEATURES: &'static [(&'stat
      ("non_ascii_idents", "1.0.0", Active),
      ("thread_local", "1.0.0", Active),
      ("link_args", "1.0.0", Active),
 -    ("phase", "1.0.0", Removed),
      ("plugin_registrar", "1.0.0", Active),
      ("log_syntax", "1.0.0", Active),
      ("trace_macros", "1.0.0", Active),
@@@ -73,7 -74,6 +73,7 @@@
  
      ("rustc_diagnostic_macros", "1.0.0", Active),
      ("unboxed_closures", "1.0.0", Active),
 +    ("reflect", "1.0.0", Active),
      ("import_shadowing", "1.0.0", Removed),
      ("advanced_slice_patterns", "1.0.0", Active),
      ("tuple_indexing", "1.0.0", Accepted),
      // A way to temporarily opt out of the new orphan rules. This will *never* be accepted.
      ("old_orphan_check", "1.0.0", Deprecated),
  
-     // A way to temporarily opt out of the new impl rules. This will *never* be accepted.
-     ("old_impl_check", "1.0.0", Deprecated),
      // OIBIT specific features
      ("optin_builtin_traits", "1.0.0", Active),
  
 -    // int and uint are now deprecated
 -    ("int_uint", "1.0.0", Active),
 -
      // macro reexport needs more discussion and stabilization
      ("macro_reexport", "1.0.0", Active),
  
@@@ -198,6 -198,7 +195,6 @@@ pub const KNOWN_ATTRIBUTES: &'static [(
      ("no_mangle", Normal),
      ("no_link", Normal),
      ("derive", Normal),
 -    ("should_fail", Normal),
      ("should_panic", Normal),
      ("ignore", Normal),
      ("no_implicit_prelude", Normal),
  
      // FIXME: #19470 this shouldn't be needed forever
      ("old_orphan_check", Whitelisted),
-     ("old_impl_check", Whitelisted),
 -    ("rustc_paren_sugar", Whitelisted), // FIXME: #18101 temporary unboxed closure hack
 +
 +    ("rustc_paren_sugar", Gated("unboxed_closures",
 +                                "unboxed_closures are still evolving")),
 +    ("rustc_reflect_like", Gated("reflect",
 +                                 "defining reflective traits is still evolving")),
  
      // Crate level attributes
      ("crate_name", CrateLevel),
@@@ -360,6 -356,7 +356,6 @@@ struct Context<'a> 
      features: Vec<&'static str>,
      span_handler: &'a SpanHandler,
      cm: &'a CodeMap,
 -    do_warnings: bool,
  }
  
  impl<'a> Context<'a> {
              emit_feature_err(self.span_handler, feature, span, explain);
          }
      }
 -
 -    fn warn_feature(&self, feature: &str, span: Span, explain: &str) {
 -        if !self.has_feature(feature) && self.do_warnings {
 -            emit_feature_warn(self.span_handler, feature, span, explain);
 -        }
 -    }
      fn has_feature(&self, feature: &str) -> bool {
          self.features.iter().any(|&n| n == feature)
      }
@@@ -588,13 -591,6 +584,6 @@@ impl<'a, 'v> Visitor<'v> for PostExpans
                          i.span,
                          "the new orphan check rules will eventually be strictly enforced");
                  }
-                 if attr::contains_name(&i.attrs[..],
-                                        "old_impl_check") {
-                     self.gate_feature("old_impl_check",
-                                       i.span,
-                                       "`#[old_impl_check]` will be removed in the future");
-                 }
              }
  
              _ => {}
          visit::walk_foreign_item(self, i)
      }
  
 -    fn visit_ty(&mut self, t: &ast::Ty) {
 -        match t.node {
 -            ast::TyPath(None, ref p) => {
 -                match &*p.segments {
 -
 -                    [ast::PathSegment { identifier, .. }] => {
 -                        let name = token::get_ident(identifier);
 -                        let msg = if name == "int" {
 -                            Some("the `int` type is deprecated; \
 -                                  use `isize` or a fixed-sized integer")
 -                        } else if name == "uint" {
 -                            Some("the `uint` type is deprecated; \
 -                                  use `usize` or a fixed-sized integer")
 -                        } else {
 -                            None
 -                        };
 -
 -                        if let Some(msg) = msg {
 -                            self.context.warn_feature("int_uint", t.span, msg)
 -                        }
 -                    }
 -                    _ => {}
 -                }
 -            }
 -            _ => {}
 -        }
 -        visit::walk_ty(self, t);
 -    }
 -
      fn visit_expr(&mut self, e: &ast::Expr) {
          match e.node {
              ast::ExprBox(..) | ast::ExprUnary(ast::UnOp::UnUniq, _) => {
                                    "box expression syntax is experimental; \
                                     you can call `Box::new` instead.");
              }
 -            ast::ExprLit(ref lit) => {
 -                match lit.node {
 -                    ast::LitInt(_, ty) => {
 -                        let msg = if let ast::SignedIntLit(ast::TyIs(true), _) = ty {
 -                            Some("the `i` and `is` suffixes on integers are deprecated; \
 -                                  use `isize` or one of the fixed-sized suffixes")
 -                        } else if let ast::UnsignedIntLit(ast::TyUs(true)) = ty {
 -                            Some("the `u` and `us` suffixes on integers are deprecated; \
 -                                  use `usize` or one of the fixed-sized suffixes")
 -                        } else {
 -                            None
 -                        };
 -                        if let Some(msg) = msg {
 -                            self.context.warn_feature("int_uint", e.span, msg);
 -                        }
 -                    }
 -                    _ => {}
 -                }
 -            }
              _ => {}
          }
          visit::walk_expr(self, e);
      }
  }
  
 -fn check_crate_inner<F>(cm: &CodeMap, span_handler: &SpanHandler, krate: &ast::Crate,
 -                        do_warnings: bool,
 +fn check_crate_inner<F>(cm: &CodeMap, span_handler: &SpanHandler,
 +                        krate: &ast::Crate,
                          check: F)
                         -> Features
      where F: FnOnce(&mut Context, &ast::Crate)
      let mut cx = Context {
          features: Vec::new(),
          span_handler: span_handler,
 -        do_warnings: do_warnings,
          cm: cm,
      };
  
  
  pub fn check_crate_macros(cm: &CodeMap, span_handler: &SpanHandler, krate: &ast::Crate)
  -> Features {
 -    check_crate_inner(cm, span_handler, krate, true,
 +    check_crate_inner(cm, span_handler, krate,
                        |ctx, krate| visit::walk_crate(&mut MacroVisitor { context: ctx }, krate))
  }
  
 -pub fn check_crate(cm: &CodeMap, span_handler: &SpanHandler, krate: &ast::Crate,
 -                   do_warnings: bool) -> Features
 +pub fn check_crate(cm: &CodeMap, span_handler: &SpanHandler, krate: &ast::Crate)
 +                   -> Features
  {
 -    check_crate_inner(cm, span_handler, krate, do_warnings,
 +    check_crate_inner(cm, span_handler, krate,
                        |ctx, krate| visit::walk_crate(&mut PostExpansionVisitor { context: ctx },
                                                       krate))
  }