Skip to content

Commit a1d4d2f

Browse files
committed
---
yaml --- r: 184028 b: refs/heads/auto c: d801a4d h: refs/heads/master v: v3
1 parent 1bff463 commit a1d4d2f

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
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: 1735e41d1cbbe0666e188ccf3a064e5c8afb482c
13+
refs/heads/auto: d801a4da7cc8672c3b7655ccad218ab892b8dd9b
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/libcore/iter.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ use clone::Clone;
6262
use cmp;
6363
use cmp::Ord;
6464
use default::Default;
65+
use marker;
6566
use mem;
6667
use num::{ToPrimitive, Int};
6768
use ops::{Add, Deref, FnMut};
@@ -947,7 +948,7 @@ pub trait IteratorExt: Iterator + Sized {
947948
FromB: Default + Extend<B>,
948949
Self: Iterator<Item=(A, B)>,
949950
{
950-
struct SizeHint<A>(usize, Option<usize>);
951+
struct SizeHint<A>(usize, Option<usize>, marker::PhantomData<A>);
951952
impl<A> Iterator for SizeHint<A> {
952953
type Item = A;
953954

@@ -961,8 +962,8 @@ pub trait IteratorExt: Iterator + Sized {
961962
let mut ts: FromA = Default::default();
962963
let mut us: FromB = Default::default();
963964

964-
ts.extend(SizeHint(lo, hi));
965-
us.extend(SizeHint(lo, hi));
965+
ts.extend(SizeHint(lo, hi, marker::PhantomData));
966+
us.extend(SizeHint(lo, hi, marker::PhantomData));
966967

967968
for (t, u) in self {
968969
ts.extend(Some(t).into_iter());
@@ -2047,8 +2048,8 @@ pub struct Scan<I, St, F> {
20472048
}
20482049

20492050
#[stable(feature = "rust1", since = "1.0.0")]
2050-
impl<B, I: Iterator, St, F> Iterator for Scan<I, St, F> where
2051-
F: FnMut(&mut St, I::Item) -> Option<B>,
2051+
impl<A, B, I: Iterator<Item=A>, St, F> Iterator for Scan<I, St, F> where
2052+
F: FnMut(&mut St, A) -> Option<B>,
20522053
{
20532054
type Item = B;
20542055

0 commit comments

Comments
 (0)