about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-05-17 06:25:58 +0000
committerbors <bors@rust-lang.org>2015-05-17 06:25:58 +0000
commit9f3a7f0c2bba10164c1e8581e2b3da7f9524178c (patch)
tree4822093f18d67cd2acbbded5d23c2f1b1eeeacfc /src/libstd
parent4f83c4b8513fe77ab27e1f8d07cf5c7d577a1fe2 (diff)
parenta0815c8c747eb63adec7b863047c0f176eafce94 (diff)
downloadrust-9f3a7f0c2bba10164c1e8581e2b3da7f9524178c.tar.gz
rust-9f3a7f0c2bba10164c1e8581e2b3da7f9524178c.zip
Auto merge of #25525 - Manishearth:rollup, r=Manishearth
- Successful merges: #25465, #25469, #25472, #25474, #25476, #25484, #25490, #25493, #25503, #25506, #25508, #25510, #25516, #25522
- Failed merges: 
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/collections/hash/map.rs2
-rw-r--r--src/libstd/ffi/c_str.rs3
-rw-r--r--src/libstd/fs.rs11
-rw-r--r--src/libstd/net/mod.rs2
-rw-r--r--src/libstd/path.rs4
5 files changed, 10 insertions, 12 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs
index 48f65a5abfd..a5fbc4374e0 100644
--- a/src/libstd/collections/hash/map.rs
+++ b/src/libstd/collections/hash/map.rs
@@ -539,7 +539,7 @@ impl<K, V, S> HashMap<K, V, S>
 {
     /// Creates an empty hashmap which will use the given hasher to hash keys.
     ///
-    /// The creates map has the default initial capacity.
+    /// The created map has the default initial capacity.
     ///
     /// # Examples
     ///
diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs
index 04513e9d048..b83a8efe1d0 100644
--- a/src/libstd/ffi/c_str.rs
+++ b/src/libstd/ffi/c_str.rs
@@ -53,8 +53,7 @@ use vec::Vec;
 ///     fn my_printer(s: *const libc::c_char);
 /// }
 ///
-/// let to_print = &b"Hello, world!"[..];
-/// let c_to_print = CString::new(to_print).unwrap();
+/// let c_to_print = CString::new("Hello, world!").unwrap();
 /// unsafe {
 ///     my_printer(c_to_print.as_ptr());
 /// }
diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs
index fc5405ea7f6..481d9e69abd 100644
--- a/src/libstd/fs.rs
+++ b/src/libstd/fs.rs
@@ -1099,20 +1099,19 @@ pub fn remove_dir_all<P: AsRef<Path>>(path: P) -> io::Result<()> {
 /// # Examples
 ///
 /// ```
-/// # #![feature(path_ext)]
 /// use std::io;
-/// use std::fs::{self, PathExt, DirEntry};
+/// use std::fs::{self, DirEntry};
 /// use std::path::Path;
 ///
 /// // one possible implementation of fs::walk_dir only visiting files
-/// fn visit_dirs(dir: &Path, cb: &mut FnMut(DirEntry)) -> io::Result<()> {
-///     if dir.is_dir() {
+/// fn visit_dirs(dir: &Path, cb: &Fn(&DirEntry)) -> io::Result<()> {
+///     if try!(fs::metadata(dir)).is_dir() {
 ///         for entry in try!(fs::read_dir(dir)) {
 ///             let entry = try!(entry);
-///             if entry.path().is_dir() {
+///             if try!(fs::metadata(entry.path())).is_dir() {
 ///                 try!(visit_dirs(&entry.path(), cb));
 ///             } else {
-///                 cb(entry);
+///                 cb(&entry);
 ///             }
 ///         }
 ///     }
diff --git a/src/libstd/net/mod.rs b/src/libstd/net/mod.rs
index bff9774bcd0..a79a451305d 100644
--- a/src/libstd/net/mod.rs
+++ b/src/libstd/net/mod.rs
@@ -19,7 +19,7 @@ use sys_common::net as net_imp;
 
 pub use self::ip::{IpAddr, Ipv4Addr, Ipv6Addr, Ipv6MulticastScope};
 pub use self::addr::{SocketAddr, SocketAddrV4, SocketAddrV6, ToSocketAddrs};
-pub use self::tcp::{TcpStream, TcpListener};
+pub use self::tcp::{TcpStream, TcpListener, Incoming};
 pub use self::udp::UdpSocket;
 pub use self::parser::AddrParseError;
 
diff --git a/src/libstd/path.rs b/src/libstd/path.rs
index 934b3156357..6732af556e0 100644
--- a/src/libstd/path.rs
+++ b/src/libstd/path.rs
@@ -1485,7 +1485,7 @@ impl Path {
         iter_after(self.components().rev(), child.as_ref().components().rev()).is_some()
     }
 
-    /// Extracts the stem (non-extension) portion of `self.file()`.
+    /// Extracts the stem (non-extension) portion of `self.file_name()`.
     ///
     /// The stem is:
     ///
@@ -1508,7 +1508,7 @@ impl Path {
         self.file_name().map(split_file_at_dot).and_then(|(before, after)| before.or(after))
     }
 
-    /// Extracts the extension of `self.file()`, if possible.
+    /// Extracts the extension of `self.file_name()`, if possible.
     ///
     /// The extension is:
     ///