Skip to content

Commit 7e93d0e

Browse files
committed
---
yaml --- r: 191039 b: refs/heads/auto c: 30718dd h: refs/heads/master i: 191037: 69d6ab1 191035: 867de72 191031: 10ead0e 191023: 250a4af 191007: cbbf80f 190975: f06156f v: v3
1 parent 23d1619 commit 7e93d0e

File tree

17 files changed

+406
-62
lines changed

17 files changed

+406
-62
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: da96d22d3a8bd4ad74e797b823dd10a34d88991e
13+
refs/heads/auto: 30718dd44be229a5c61648a4aed6711441ef7b6d
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/libcollectionstest/vec_deque.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ fn test_mut_rev_iter_wrap() {
360360
assert_eq!(d.pop_front(), Some(1));
361361
d.push_back(4);
362362

363-
assert_eq!(d.iter_mut().rev().cloned().collect::<Vec<_>>(),
363+
assert_eq!(d.iter_mut().rev().map(|x| *x).collect::<Vec<_>>(),
364364
vec![4, 3, 2]);
365365
}
366366

branches/auto/src/libcore/iter.rs

Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ use default::Default;
6565
use marker;
6666
use mem;
6767
use num::{ToPrimitive, Int};
68-
use ops::{Add, Deref, FnMut, RangeFrom};
68+
use ops::{Add, FnMut, RangeFrom};
6969
use option::Option;
7070
use option::Option::{Some, None};
7171
use marker::Sized;
@@ -976,12 +976,11 @@ pub trait IteratorExt: Iterator + Sized {
976976
(ts, us)
977977
}
978978

979-
/// Creates an iterator that clones the elements it yields. Useful for converting an
980-
/// Iterator<&T> to an Iterator<T>.
981-
#[unstable(feature = "core", reason = "recent addition")]
982-
fn cloned(self) -> Cloned<Self> where
983-
Self::Item: Deref,
984-
<Self::Item as Deref>::Target: Clone,
979+
/// Creates an iterator that clones the elements it yields. Useful for
980+
/// converting an Iterator<&T> to an Iterator<T>.
981+
#[stable(feature = "rust1", since = "1.0.0")]
982+
fn cloned<'a, T: 'a>(self) -> Cloned<Self>
983+
where Self: Iterator<Item=&'a T>, T: Clone
985984
{
986985
Cloned { it: self }
987986
}
@@ -1279,14 +1278,12 @@ pub struct Cloned<I> {
12791278
}
12801279

12811280
#[stable(feature = "rust1", since = "1.0.0")]
1282-
impl<I> Iterator for Cloned<I> where
1283-
I: Iterator,
1284-
I::Item: Deref,
1285-
<I::Item as Deref>::Target: Clone
1281+
impl<'a, I, T: 'a> Iterator for Cloned<I>
1282+
where I: Iterator<Item=&'a T>, T: Clone
12861283
{
1287-
type Item = <I::Item as Deref>::Target;
1284+
type Item = T;
12881285

1289-
fn next(&mut self) -> Option<<Self as Iterator>::Item> {
1286+
fn next(&mut self) -> Option<T> {
12901287
self.it.next().cloned()
12911288
}
12921289

@@ -1296,36 +1293,30 @@ impl<I> Iterator for Cloned<I> where
12961293
}
12971294

12981295
#[stable(feature = "rust1", since = "1.0.0")]
1299-
impl<I> DoubleEndedIterator for Cloned<I> where
1300-
I: DoubleEndedIterator,
1301-
I::Item: Deref,
1302-
<I::Item as Deref>::Target: Clone
1296+
impl<'a, I, T: 'a> DoubleEndedIterator for Cloned<I>
1297+
where I: DoubleEndedIterator<Item=&'a T>, T: Clone
13031298
{
1304-
fn next_back(&mut self) -> Option<<Self as Iterator>::Item> {
1299+
fn next_back(&mut self) -> Option<T> {
13051300
self.it.next_back().cloned()
13061301
}
13071302
}
13081303

13091304
#[stable(feature = "rust1", since = "1.0.0")]
1310-
impl<I> ExactSizeIterator for Cloned<I> where
1311-
I: ExactSizeIterator,
1312-
I::Item: Deref,
1313-
<I::Item as Deref>::Target: Clone
1305+
impl<'a, I, T: 'a> ExactSizeIterator for Cloned<I>
1306+
where I: ExactSizeIterator<Item=&'a T>, T: Clone
13141307
{}
13151308

13161309
#[unstable(feature = "core", reason = "trait is experimental")]
1317-
impl<I> RandomAccessIterator for Cloned<I> where
1318-
I: RandomAccessIterator,
1319-
I::Item: Deref,
1320-
<I::Item as Deref>::Target: Clone
1310+
impl<'a, I, T: 'a> RandomAccessIterator for Cloned<I>
1311+
where I: RandomAccessIterator<Item=&'a T>, T: Clone
13211312
{
13221313
#[inline]
13231314
fn indexable(&self) -> usize {
13241315
self.it.indexable()
13251316
}
13261317

13271318
#[inline]
1328-
fn idx(&mut self, index: usize) -> Option<<Self as Iterator>::Item> {
1319+
fn idx(&mut self, index: usize) -> Option<T> {
13291320
self.it.idx(index).cloned()
13301321
}
13311322
}

branches/auto/src/libcore/result.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ impl<T, E> Result<T, E> {
330330
/// Convert from `Result<T, E>` to `Option<E>`
331331
///
332332
/// Converts `self` into an `Option<E>`, consuming `self`,
333-
/// and discarding the value, if any.
333+
/// and discarding the success value, if any.
334334
///
335335
/// # Examples
336336
///

0 commit comments

Comments
 (0)