From 00d1873c4729f1e8c109b64a7eeb87877f075279 Mon Sep 17 00:00:00 2001 From: Kevin Yap Date: Sun, 1 Feb 2015 19:36:42 -0800 Subject: Use `for` instead of `while` in ascii.rs tests --- src/libstd/ascii.rs | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) (limited to 'src/libstd') diff --git a/src/libstd/ascii.rs b/src/libstd/ascii.rs index 892747e79ed..ac48481027d 100644 --- a/src/libstd/ascii.rs +++ b/src/libstd/ascii.rs @@ -338,7 +338,6 @@ mod tests { assert!("".is_ascii()); assert!("a".is_ascii()); assert!(!"\u{2009}".is_ascii()); - } #[test] @@ -346,13 +345,11 @@ mod tests { assert_eq!("url()URL()uRl()ürl".to_ascii_uppercase(), "URL()URL()URL()üRL"); assert_eq!("hıKß".to_ascii_uppercase(), "HıKß"); - let mut i = 0; - while i <= 500 { + for i in 0u32..501 { let upper = if 'a' as u32 <= i && i <= 'z' as u32 { i + 'A' as u32 - 'a' as u32 } else { i }; assert_eq!((from_u32(i).unwrap()).to_string().to_ascii_uppercase(), (from_u32(upper).unwrap()).to_string()); - i += 1; } } @@ -362,13 +359,11 @@ mod tests { // Dotted capital I, Kelvin sign, Sharp S. assert_eq!("HİKß".to_ascii_lowercase(), "hİKß"); - let mut i = 0; - while i <= 500 { + for i in 0u32..501 { let lower = if 'A' as u32 <= i && i <= 'Z' as u32 { i + 'a' as u32 - 'A' as u32 } else { i }; assert_eq!((from_u32(i).unwrap()).to_string().to_ascii_lowercase(), (from_u32(lower).unwrap()).to_string()); - i += 1; } } @@ -378,13 +373,11 @@ mod tests { "URL()URL()URL()üRL".to_string()); assert_eq!(("hıKß".to_string()).into_ascii_uppercase(), "HıKß"); - let mut i = 0; - while i <= 500 { + for i in 0u32..501 { let upper = if 'a' as u32 <= i && i <= 'z' as u32 { i + 'A' as u32 - 'a' as u32 } else { i }; assert_eq!((from_u32(i).unwrap()).to_string().into_ascii_uppercase(), (from_u32(upper).unwrap()).to_string()); - i += 1; } } @@ -395,13 +388,11 @@ mod tests { // Dotted capital I, Kelvin sign, Sharp S. assert_eq!(("HİKß".to_string()).into_ascii_lowercase(), "hİKß"); - let mut i = 0; - while i <= 500 { + for i in 0u32..501 { let lower = if 'A' as u32 <= i && i <= 'Z' as u32 { i + 'a' as u32 - 'A' as u32 } else { i }; assert_eq!((from_u32(i).unwrap()).to_string().into_ascii_lowercase(), (from_u32(lower).unwrap()).to_string()); - i += 1; } } @@ -415,14 +406,11 @@ mod tests { assert!(!"K".eq_ignore_ascii_case("k")); assert!(!"ß".eq_ignore_ascii_case("s")); - let mut i = 0; - while i <= 500 { - let c = i; - let lower = if 'A' as u32 <= c && c <= 'Z' as u32 { c + 'a' as u32 - 'A' as u32 } - else { c }; + for i in 0u32..501 { + let lower = if 'A' as u32 <= i && i <= 'Z' as u32 { i + 'a' as u32 - 'A' as u32 } + else { i }; assert!((from_u32(i).unwrap()).to_string().eq_ignore_ascii_case( &from_u32(lower).unwrap().to_string())); - i += 1; } } } -- cgit 1.4.1-3-g733a5 From dca49e06b18c63185a60e73f4ccde77ed541c079 Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Wed, 4 Feb 2015 02:26:00 +0100 Subject: Move native thread name setting from thread_info to Thread, fixes #21911 --- src/libstd/sys/common/thread_info.rs | 4 ---- src/libstd/thread.rs | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/libstd') diff --git a/src/libstd/sys/common/thread_info.rs b/src/libstd/sys/common/thread_info.rs index ce67a584a0a..92b936e74f6 100644 --- a/src/libstd/sys/common/thread_info.rs +++ b/src/libstd/sys/common/thread_info.rs @@ -56,10 +56,6 @@ pub fn stack_guard() -> uint { pub fn set(stack_bounds: (uint, uint), stack_guard: uint, thread: Thread) { THREAD_INFO.with(|c| assert!(c.borrow().is_none())); - match thread.name() { - Some(name) => unsafe { ::sys::thread::set_name(name); }, - None => {} - } THREAD_INFO.with(move |c| *c.borrow_mut() = Some(ThreadInfo{ stack_bounds: stack_bounds, stack_guard: stack_guard, diff --git a/src/libstd/thread.rs b/src/libstd/thread.rs index eb967c9f4e3..dda97bec925 100644 --- a/src/libstd/thread.rs +++ b/src/libstd/thread.rs @@ -280,6 +280,10 @@ impl Builder { unsafe { stack::record_os_managed_stack_bounds(my_stack_bottom, my_stack_top); } + match their_thread.name() { + Some(name) => unsafe { imp::set_name(name.as_slice()); }, + None => {} + } thread_info::set( (my_stack_bottom, my_stack_top), unsafe { imp::guard::current() }, -- cgit 1.4.1-3-g733a5 From 34afe5e193182a0029abe1ae8258f79f4cd56cd9 Mon Sep 17 00:00:00 2001 From: Alexander Korolkov Date: Thu, 5 Feb 2015 15:04:07 +0300 Subject: Rename Show to Debug, String to Display Update reference.md: - derive() no longer supports Zero trait - derive() now supports Copy trait --- src/doc/reference.md | 4 ++-- src/libcore/any.rs | 2 +- src/libgetopts/lib.rs | 6 +++--- src/librustc/middle/ty.rs | 2 +- src/librustdoc/html/format.rs | 2 +- src/libserialize/json.rs | 4 ++-- src/libstd/old_path/mod.rs | 4 ++-- src/libstd/sys/windows/os.rs | 2 +- src/libsyntax/ast.rs | 1 - 9 files changed, 13 insertions(+), 14 deletions(-) (limited to 'src/libstd') diff --git a/src/doc/reference.md b/src/doc/reference.md index 9c8191a386d..999cb217f93 100644 --- a/src/doc/reference.md +++ b/src/doc/reference.md @@ -2354,8 +2354,8 @@ Supported traits for `derive` are: * `FromPrimitive`, to create an instance from a numeric primitive. * `Hash`, to iterate over the bytes in a data type. * `Rand`, to create a random instance of a data type. -* `Show`, to format a value using the `{}` formatter. -* `Zero`, to create a zero instance of a numeric data type. +* `Debug`, to format a value using the `{:?}` formatter. +* `Copy`, for "Plain Old Data" types which can be copied by simply moving bits. ### Compiler Features diff --git a/src/libcore/any.rs b/src/libcore/any.rs index 40c2d82bf4b..462b6771b4a 100644 --- a/src/libcore/any.rs +++ b/src/libcore/any.rs @@ -27,7 +27,7 @@ //! # Examples //! //! Consider a situation where we want to log out a value passed to a function. -//! We know the value we're working on implements Show, but we don't know its +//! We know the value we're working on implements Debug, but we don't know its //! concrete type. We want to give special treatment to certain types: in this //! case printing out the length of String values prior to their value. //! We don't know the concrete type of our value at compile time, so we need to diff --git a/src/libgetopts/lib.rs b/src/libgetopts/lib.rs index 1b30bdf230e..72832cb9466 100644 --- a/src/libgetopts/lib.rs +++ b/src/libgetopts/lib.rs @@ -195,7 +195,7 @@ pub struct Matches { } /// The type returned when the command line does not conform to the -/// expected format. Use the `Show` implementation to output detailed +/// expected format. Use the `Debug` implementation to output detailed /// information. #[derive(Clone, PartialEq, Eq, Debug)] pub enum Fail { @@ -545,7 +545,7 @@ impl Fail { /// Convert a `Fail` enum into an error string. #[unstable(feature = "rustc_private")] #[deprecated(since = "1.0.0", - reason = "use `fmt::String` (`{}` format specifier)")] + reason = "use `fmt::Display` (`{}` format specifier)")] pub fn to_err_msg(self) -> String { self.to_string() } @@ -579,7 +579,7 @@ impl fmt::Display for Fail { /// `opt_str`, etc. to interrogate results. /// # Panics /// -/// Returns `Err(Fail)` on failure: use the `Show` implementation of `Fail` to display +/// Returns `Err(Fail)` on failure: use the `Debug` implementation of `Fail` to display /// information about it. pub fn getopts(args: &[String], optgrps: &[OptGroup]) -> Result { let opts: Vec = optgrps.iter().map(|x| x.long_to_short()).collect(); diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs index b29a23924bb..034dbb4271d 100644 --- a/src/librustc/middle/ty.rs +++ b/src/librustc/middle/ty.rs @@ -70,7 +70,7 @@ use arena::TypedArena; use std::borrow::{BorrowFrom, Cow}; use std::cell::{Cell, RefCell}; use std::cmp; -use std::fmt::{self, Show}; +use std::fmt; use std::hash::{Hash, Writer, SipHasher, Hasher}; use std::mem; use std::ops; diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs index cc2cf21095e..e916b63eb8d 100644 --- a/src/librustdoc/html/format.rs +++ b/src/librustdoc/html/format.rs @@ -10,7 +10,7 @@ //! HTML formatting module //! -//! This module contains a large number of `fmt::String` implementations for +//! This module contains a large number of `fmt::Display` implementations for //! various types in `rustdoc::clean`. These implementations all currently //! assume that HTML output is desired, although it may be possible to redesign //! them in the future to instead emit any format desired. diff --git a/src/libserialize/json.rs b/src/libserialize/json.rs index b8383577987..daa358647d8 100644 --- a/src/libserialize/json.rs +++ b/src/libserialize/json.rs @@ -1032,7 +1032,7 @@ pub fn as_pretty_json(t: &T) -> AsPrettyJson { impl Json { /// Borrow this json object as a pretty object to generate a pretty - /// representation for it via `Show`. + /// representation for it via `Display`. pub fn pretty(&self) -> PrettyJson { PrettyJson { inner: self } } @@ -3540,7 +3540,7 @@ mod tests { fn test_hashmap_with_enum_key() { use std::collections::HashMap; use json; - #[derive(RustcEncodable, Eq, Hash, PartialEq, RustcDecodable, Show)] + #[derive(RustcEncodable, Eq, Hash, PartialEq, RustcDecodable, Debug)] enum Enum { Foo, #[allow(dead_code)] diff --git a/src/libstd/old_path/mod.rs b/src/libstd/old_path/mod.rs index 0d80258d7e0..17cfe1c8297 100644 --- a/src/libstd/old_path/mod.rs +++ b/src/libstd/old_path/mod.rs @@ -228,7 +228,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// ``` fn into_vec(self) -> Vec; - /// Returns an object that implements `Show` for printing paths + /// Returns an object that implements `Display` for printing paths /// /// # Example /// @@ -244,7 +244,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { Display{ path: self, filename: false } } - /// Returns an object that implements `Show` for printing filenames + /// Returns an object that implements `Display` for printing filenames /// /// If there is no filename, nothing will be printed. /// diff --git a/src/libstd/sys/windows/os.rs b/src/libstd/sys/windows/os.rs index d8e3e6981df..7e684c52341 100644 --- a/src/libstd/sys/windows/os.rs +++ b/src/libstd/sys/windows/os.rs @@ -191,7 +191,7 @@ impl<'a> Iterator for SplitPaths<'a> { } } -#[derive(Show)] +#[derive(Debug)] pub struct JoinPathsError; pub fn join_paths(paths: I) -> Result diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 71259ff5d9a..5ec87eaf8d1 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -64,7 +64,6 @@ use parse::token; use ptr::P; use std::fmt; -use std::fmt::Show; use std::num::Int; use std::rc::Rc; use serialize::{Encodable, Decodable, Encoder, Decoder}; -- cgit 1.4.1-3-g733a5 From 0479d90b77ab2b9abe9e242980ce8ec53fb7761d Mon Sep 17 00:00:00 2001 From: Pierre Baillet Date: Sat, 7 Feb 2015 15:11:25 +0100 Subject: Update deprecation notice. - add namespace - add function parens --- src/libstd/os.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libstd') diff --git a/src/libstd/os.rs b/src/libstd/os.rs index 1a617694456..526b5edd4cb 100644 --- a/src/libstd/os.rs +++ b/src/libstd/os.rs @@ -723,7 +723,7 @@ extern "system" { /// println!("{}", argument); /// } /// ``` -#[deprecated(since = "1.0.0", reason = "use env::args instead")] +#[deprecated(since = "1.0.0", reason = "use std::env::args() instead")] #[unstable(feature = "os")] pub fn args() -> Vec { real_args() -- cgit 1.4.1-3-g733a5 From 605225a366b62f29f5fd4b03cc298fff03bc3bdf Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 6 Feb 2015 14:47:55 -0800 Subject: std: Rename IntoIterator::Iter to IntoIter This is in preparation for stabilization of the `IntoIterator` trait. All implementations and references to `Iter` need to be renamed to `IntoIter`. [breaking-change] --- src/libcollections/binary_heap.rs | 4 ++-- src/libcollections/bit.rs | 4 ++-- src/libcollections/btree/map.rs | 6 +++--- src/libcollections/btree/set.rs | 4 ++-- src/libcollections/dlist.rs | 6 +++--- src/libcollections/enum_set.rs | 2 +- src/libcollections/ring_buf.rs | 6 +++--- src/libcollections/vec.rs | 6 +++--- src/libcollections/vec_map.rs | 6 +++--- src/libcore/array.rs | 4 ++-- src/libcore/iter.rs | 6 +++--- src/libcore/slice.rs | 4 ++-- src/libstd/collections/hash/map.rs | 6 +++--- src/libstd/collections/hash/set.rs | 4 ++-- 14 files changed, 34 insertions(+), 34 deletions(-) (limited to 'src/libstd') diff --git a/src/libcollections/binary_heap.rs b/src/libcollections/binary_heap.rs index 275fc34f813..11576fbb00c 100644 --- a/src/libcollections/binary_heap.rs +++ b/src/libcollections/binary_heap.rs @@ -656,7 +656,7 @@ impl FromIterator for BinaryHeap { } impl IntoIterator for BinaryHeap { - type Iter = IntoIter; + type IntoIter = IntoIter; fn into_iter(self) -> IntoIter { self.into_iter() @@ -664,7 +664,7 @@ impl IntoIterator for BinaryHeap { } impl<'a, T> IntoIterator for &'a BinaryHeap where T: Ord { - type Iter = Iter<'a, T>; + type IntoIter = Iter<'a, T>; fn into_iter(self) -> Iter<'a, T> { self.iter() diff --git a/src/libcollections/bit.rs b/src/libcollections/bit.rs index 8ba0eb9b7ef..6d15a264172 100644 --- a/src/libcollections/bit.rs +++ b/src/libcollections/bit.rs @@ -1071,7 +1071,7 @@ impl<'a> RandomAccessIterator for Iter<'a> { } impl<'a> IntoIterator for &'a Bitv { - type Iter = Iter<'a>; + type IntoIter = Iter<'a>; fn into_iter(self) -> Iter<'a> { self.iter() @@ -1883,7 +1883,7 @@ impl<'a> Iterator for SymmetricDifference<'a> { } impl<'a> IntoIterator for &'a BitvSet { - type Iter = SetIter<'a>; + type IntoIter = SetIter<'a>; fn into_iter(self) -> SetIter<'a> { self.iter() diff --git a/src/libcollections/btree/map.rs b/src/libcollections/btree/map.rs index aec50d53808..2cef08725a2 100644 --- a/src/libcollections/btree/map.rs +++ b/src/libcollections/btree/map.rs @@ -463,7 +463,7 @@ impl BTreeMap { } impl IntoIterator for BTreeMap { - type Iter = IntoIter; + type IntoIter = IntoIter; fn into_iter(self) -> IntoIter { self.into_iter() @@ -471,7 +471,7 @@ impl IntoIterator for BTreeMap { } impl<'a, K, V> IntoIterator for &'a BTreeMap { - type Iter = Iter<'a, K, V>; + type IntoIter = Iter<'a, K, V>; fn into_iter(self) -> Iter<'a, K, V> { self.iter() @@ -479,7 +479,7 @@ impl<'a, K, V> IntoIterator for &'a BTreeMap { } impl<'a, K, V> IntoIterator for &'a mut BTreeMap { - type Iter = IterMut<'a, K, V>; + type IntoIter = IterMut<'a, K, V>; fn into_iter(mut self) -> IterMut<'a, K, V> { self.iter_mut() diff --git a/src/libcollections/btree/set.rs b/src/libcollections/btree/set.rs index c888a261f9d..7cb31ab1f6d 100644 --- a/src/libcollections/btree/set.rs +++ b/src/libcollections/btree/set.rs @@ -481,7 +481,7 @@ impl FromIterator for BTreeSet { } impl IntoIterator for BTreeSet { - type Iter = IntoIter; + type IntoIter = IntoIter; fn into_iter(self) -> IntoIter { self.into_iter() @@ -489,7 +489,7 @@ impl IntoIterator for BTreeSet { } impl<'a, T> IntoIterator for &'a BTreeSet { - type Iter = Iter<'a, T>; + type IntoIter = Iter<'a, T>; fn into_iter(self) -> Iter<'a, T> { self.iter() diff --git a/src/libcollections/dlist.rs b/src/libcollections/dlist.rs index 748230c5d24..a080146e0ec 100644 --- a/src/libcollections/dlist.rs +++ b/src/libcollections/dlist.rs @@ -831,7 +831,7 @@ impl FromIterator for DList { } impl IntoIterator for DList { - type Iter = IntoIter; + type IntoIter = IntoIter; fn into_iter(self) -> IntoIter { self.into_iter() @@ -839,7 +839,7 @@ impl IntoIterator for DList { } impl<'a, T> IntoIterator for &'a DList { - type Iter = Iter<'a, T>; + type IntoIter = Iter<'a, T>; fn into_iter(self) -> Iter<'a, T> { self.iter() @@ -847,7 +847,7 @@ impl<'a, T> IntoIterator for &'a DList { } impl<'a, T> IntoIterator for &'a mut DList { - type Iter = IterMut<'a, T>; + type IntoIter = IterMut<'a, T>; fn into_iter(mut self) -> IterMut<'a, T> { self.iter_mut() diff --git a/src/libcollections/enum_set.rs b/src/libcollections/enum_set.rs index da146506077..da533d34703 100644 --- a/src/libcollections/enum_set.rs +++ b/src/libcollections/enum_set.rs @@ -258,7 +258,7 @@ impl FromIterator for EnumSet { } impl<'a, E> IntoIterator for &'a EnumSet where E: CLike { - type Iter = Iter; + type IntoIter = Iter; fn into_iter(self) -> Iter { self.iter() diff --git a/src/libcollections/ring_buf.rs b/src/libcollections/ring_buf.rs index 76849e6ade8..5f1dc1d2ef4 100644 --- a/src/libcollections/ring_buf.rs +++ b/src/libcollections/ring_buf.rs @@ -1608,7 +1608,7 @@ impl FromIterator for RingBuf { } impl IntoIterator for RingBuf { - type Iter = IntoIter; + type IntoIter = IntoIter; fn into_iter(self) -> IntoIter { self.into_iter() @@ -1616,7 +1616,7 @@ impl IntoIterator for RingBuf { } impl<'a, T> IntoIterator for &'a RingBuf { - type Iter = Iter<'a, T>; + type IntoIter = Iter<'a, T>; fn into_iter(self) -> Iter<'a, T> { self.iter() @@ -1624,7 +1624,7 @@ impl<'a, T> IntoIterator for &'a RingBuf { } impl<'a, T> IntoIterator for &'a mut RingBuf { - type Iter = IterMut<'a, T>; + type IntoIter = IterMut<'a, T>; fn into_iter(mut self) -> IterMut<'a, T> { self.iter_mut() diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index 70097c956cd..1cd2a89ad60 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -1388,7 +1388,7 @@ impl FromIterator for Vec { } impl IntoIterator for Vec { - type Iter = IntoIter; + type IntoIter = IntoIter; fn into_iter(self) -> IntoIter { self.into_iter() @@ -1396,7 +1396,7 @@ impl IntoIterator for Vec { } impl<'a, T> IntoIterator for &'a Vec { - type Iter = slice::Iter<'a, T>; + type IntoIter = slice::Iter<'a, T>; fn into_iter(self) -> slice::Iter<'a, T> { self.iter() @@ -1404,7 +1404,7 @@ impl<'a, T> IntoIterator for &'a Vec { } impl<'a, T> IntoIterator for &'a mut Vec { - type Iter = slice::IterMut<'a, T>; + type IntoIter = slice::IterMut<'a, T>; fn into_iter(mut self) -> slice::IterMut<'a, T> { self.iter_mut() diff --git a/src/libcollections/vec_map.rs b/src/libcollections/vec_map.rs index 739b8d8ce19..93d02de9b55 100644 --- a/src/libcollections/vec_map.rs +++ b/src/libcollections/vec_map.rs @@ -669,7 +669,7 @@ impl FromIterator<(usize, V)> for VecMap { } impl IntoIterator for VecMap { - type Iter = IntoIter; + type IntoIter = IntoIter; fn into_iter(self) -> IntoIter { self.into_iter() @@ -677,7 +677,7 @@ impl IntoIterator for VecMap { } impl<'a, T> IntoIterator for &'a VecMap { - type Iter = Iter<'a, T>; + type IntoIter = Iter<'a, T>; fn into_iter(self) -> Iter<'a, T> { self.iter() @@ -685,7 +685,7 @@ impl<'a, T> IntoIterator for &'a VecMap { } impl<'a, T> IntoIterator for &'a mut VecMap { - type Iter = IterMut<'a, T>; + type IntoIter = IterMut<'a, T>; fn into_iter(mut self) -> IterMut<'a, T> { self.iter_mut() diff --git a/src/libcore/array.rs b/src/libcore/array.rs index 5c4567e567b..a596fe4a588 100644 --- a/src/libcore/array.rs +++ b/src/libcore/array.rs @@ -49,7 +49,7 @@ macro_rules! array_impls { } impl<'a, T> IntoIterator for &'a [T; $N] { - type Iter = Iter<'a, T>; + type IntoIter = Iter<'a, T>; fn into_iter(self) -> Iter<'a, T> { self.iter() @@ -57,7 +57,7 @@ macro_rules! array_impls { } impl<'a, T> IntoIterator for &'a mut [T; $N] { - type Iter = IterMut<'a, T>; + type IntoIter = IterMut<'a, T>; fn into_iter(self) -> IterMut<'a, T> { self.iter_mut() diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs index fcf46b81a57..2d240a53c4f 100644 --- a/src/libcore/iter.rs +++ b/src/libcore/iter.rs @@ -120,14 +120,14 @@ pub trait FromIterator { /// Conversion into an `Iterator` pub trait IntoIterator { - type Iter: Iterator; + type IntoIter: Iterator; /// Consumes `Self` and returns an iterator over it - fn into_iter(self) -> Self::Iter; + fn into_iter(self) -> Self::IntoIter; } impl IntoIterator for I where I: Iterator { - type Iter = I; + type IntoIter = I; fn into_iter(self) -> I { self diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs index fc51920ec6b..459addb09fd 100644 --- a/src/libcore/slice.rs +++ b/src/libcore/slice.rs @@ -628,7 +628,7 @@ impl<'a, T> Default for &'a [T] { // impl<'a, T> IntoIterator for &'a [T] { - type Iter = Iter<'a, T>; + type IntoIter = Iter<'a, T>; fn into_iter(self) -> Iter<'a, T> { self.iter() @@ -636,7 +636,7 @@ impl<'a, T> IntoIterator for &'a [T] { } impl<'a, T> IntoIterator for &'a mut [T] { - type Iter = IterMut<'a, T>; + type IntoIter = IterMut<'a, T>; fn into_iter(self) -> IterMut<'a, T> { self.iter_mut() diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index 710f021d912..18dd122891d 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -1377,7 +1377,7 @@ impl<'a, K, V, S, H> IntoIterator for &'a HashMap S: HashState, H: hash::Hasher { - type Iter = Iter<'a, K, V>; + type IntoIter = Iter<'a, K, V>; fn into_iter(self) -> Iter<'a, K, V> { self.iter() @@ -1389,7 +1389,7 @@ impl<'a, K, V, S, H> IntoIterator for &'a mut HashMap S: HashState, H: hash::Hasher { - type Iter = IterMut<'a, K, V>; + type IntoIter = IterMut<'a, K, V>; fn into_iter(mut self) -> IterMut<'a, K, V> { self.iter_mut() @@ -1401,7 +1401,7 @@ impl IntoIterator for HashMap S: HashState, H: hash::Hasher { - type Iter = IntoIter; + type IntoIter = IntoIter; fn into_iter(self) -> IntoIter { self.into_iter() diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs index e40f17f29e8..de3c0424c9a 100644 --- a/src/libstd/collections/hash/set.rs +++ b/src/libstd/collections/hash/set.rs @@ -840,7 +840,7 @@ impl<'a, T, S, H> IntoIterator for &'a HashSet S: HashState, H: hash::Hasher { - type Iter = Iter<'a, T>; + type IntoIter = Iter<'a, T>; fn into_iter(self) -> Iter<'a, T> { self.iter() @@ -852,7 +852,7 @@ impl IntoIterator for HashSet S: HashState, H: hash::Hasher { - type Iter = IntoIter; + type IntoIter = IntoIter; fn into_iter(self) -> IntoIter { self.into_iter() -- cgit 1.4.1-3-g733a5 From 7d2404cb420591588684d4681cf81fe8cff1ace3 Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Tue, 10 Feb 2015 15:06:45 +0100 Subject: Move native thread name setting from thread_info to Thread, fixes #21911 --- src/libstd/thread.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/libstd') diff --git a/src/libstd/thread.rs b/src/libstd/thread.rs index dda97bec925..cc9d7492441 100644 --- a/src/libstd/thread.rs +++ b/src/libstd/thread.rs @@ -156,6 +156,7 @@ use ops::{Drop, FnOnce}; use option::Option::{self, Some, None}; use result::Result::{Err, Ok}; use sync::{Mutex, Condvar, Arc}; +use str::Str; use string::String; use rt::{self, unwind}; use old_io::{Writer, stdio}; -- cgit 1.4.1-3-g733a5