diff options
| author | bors <bors@rust-lang.org> | 2016-04-06 13:44:51 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-04-06 13:44:51 -0700 |
| commit | bf5da36f1dfae45941ec39ef67a41fdbd22c1a50 (patch) | |
| tree | c019fe043d842df6d5e19c131d304cb541f7e7a8 /src/libstd | |
| parent | 943ec3bdfc9ba28e94b6d00a2b53fb2cd8b21655 (diff) | |
| parent | 862ae9aa75b073f4d753aa8275fb139ab9729d74 (diff) | |
| download | rust-bf5da36f1dfae45941ec39ef67a41fdbd22c1a50.tar.gz rust-bf5da36f1dfae45941ec39ef67a41fdbd22c1a50.zip | |
Auto merge of #32778 - steveklabnik:rollup, r=steveklabnik
Rollup of 12 pull requests - Successful merges: #31762, #32538, #32634, #32668, #32679, #32691, #32724, #32727, #32744, #32761, #32766, #32774 - Failed merges:
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/collections/hash/map.rs | 12 | ||||
| -rw-r--r-- | src/libstd/env.rs | 18 | ||||
| -rw-r--r-- | src/libstd/fs.rs | 2 | ||||
| -rw-r--r-- | src/libstd/primitive_docs.rs | 6 |
4 files changed, 18 insertions, 20 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index 4c29023660a..234042ab011 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -428,10 +428,7 @@ fn robin_hood<'a, K: 'a, V: 'a>(bucket: FullBucketMut<'a, K, V>, mut val: V) -> &'a mut V { let starting_index = bucket.index(); - let size = { - let table = bucket.table(); // FIXME "lifetime too short". - table.size() - }; + let size = bucket.table().size(); // Save the *starting point*. let mut bucket = bucket.stash(); // There can be at most `size - dib` buckets to displace, because @@ -744,10 +741,9 @@ impl<K, V, S> HashMap<K, V, S> let h = bucket.hash(); let (b, k, v) = bucket.take(); self.insert_hashed_ordered(h, k, v); - { - let t = b.table(); // FIXME "lifetime too short". - if t.size() == 0 { break } - }; + if b.table().size() == 0 { + break; + } b.into_bucket() } Empty(b) => b.into_bucket() diff --git a/src/libstd/env.rs b/src/libstd/env.rs index 40f6528f63e..9dc6a26cdee 100644 --- a/src/libstd/env.rs +++ b/src/libstd/env.rs @@ -181,7 +181,7 @@ fn _var(key: &OsStr) -> Result<String, VarError> { } /// Fetches the environment variable `key` from the current process, returning -/// None if the variable isn't set. +/// `None` if the variable isn't set. /// /// # Examples /// @@ -617,7 +617,7 @@ pub mod consts { #[stable(feature = "env", since = "1.0.0")] pub const ARCH: &'static str = super::arch::ARCH; - /// The family of the operating system. In this case, `unix`. + /// The family of the operating system. Example value is `unix`. /// /// Some possible values: /// @@ -626,8 +626,8 @@ pub mod consts { #[stable(feature = "env", since = "1.0.0")] pub const FAMILY: &'static str = super::os::FAMILY; - /// A string describing the specific operating system in use: in this - /// case, `linux`. + /// A string describing the specific operating system in use. + /// Example value is `linux`. /// /// Some possible values: /// @@ -646,7 +646,7 @@ pub mod consts { pub const OS: &'static str = super::os::OS; /// Specifies the filename prefix used for shared libraries on this - /// platform: in this case, `lib`. + /// platform. Example value is `lib`. /// /// Some possible values: /// @@ -656,7 +656,7 @@ pub mod consts { pub const DLL_PREFIX: &'static str = super::os::DLL_PREFIX; /// Specifies the filename suffix used for shared libraries on this - /// platform: in this case, `.so`. + /// platform. Example value is `.so`. /// /// Some possible values: /// @@ -667,7 +667,7 @@ pub mod consts { pub const DLL_SUFFIX: &'static str = super::os::DLL_SUFFIX; /// Specifies the file extension used for shared libraries on this - /// platform that goes after the dot: in this case, `so`. + /// platform that goes after the dot. Example value is `so`. /// /// Some possible values: /// @@ -678,7 +678,7 @@ pub mod consts { pub const DLL_EXTENSION: &'static str = super::os::DLL_EXTENSION; /// Specifies the filename suffix used for executable binaries on this - /// platform: in this case, the empty string. + /// platform. Example value is `.exe`. /// /// Some possible values: /// @@ -690,7 +690,7 @@ pub mod consts { pub const EXE_SUFFIX: &'static str = super::os::EXE_SUFFIX; /// Specifies the file extension, if any, used for executable binaries - /// on this platform: in this case, the empty string. + /// on this platform. Example value is `exe`. /// /// Some possible values: /// diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs index d8af73816c9..c4d6cb33365 100644 --- a/src/libstd/fs.rs +++ b/src/libstd/fs.rs @@ -1708,7 +1708,7 @@ mod tests { let tmpdir = tmpdir(); let dir = &tmpdir.join("fileinfo_false_on_dir"); check!(fs::create_dir(dir)); - assert!(dir.is_file() == false); + assert!(!dir.is_file()); check!(fs::remove_dir(dir)); } diff --git a/src/libstd/primitive_docs.rs b/src/libstd/primitive_docs.rs index c8ea28c5ca3..e083605a2ac 100644 --- a/src/libstd/primitive_docs.rs +++ b/src/libstd/primitive_docs.rs @@ -425,10 +425,11 @@ mod prim_str { } /// /// # Trait implementations /// -/// If every type inside a tuple implements one of the following -/// traits, then a tuple itself also implements it. +/// If every type inside a tuple implements one of the following traits, then a +/// tuple itself also implements it. /// /// * [`Clone`] +/// * [`Copy`] /// * [`PartialEq`] /// * [`Eq`] /// * [`PartialOrd`] @@ -438,6 +439,7 @@ mod prim_str { } /// * [`Hash`] /// /// [`Clone`]: clone/trait.Clone.html +/// [`Copy`]: marker/trait.Copy.html /// [`PartialEq`]: cmp/trait.PartialEq.html /// [`Eq`]: cmp/trait.Eq.html /// [`PartialOrd`]: cmp/trait.PartialOrd.html |
