Skip to content

Commit 2a4fb38

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 171705 b: refs/heads/beta c: 62ee3f1 h: refs/heads/master i: 171703: da66367 v: v3
1 parent f34c5ff commit 2a4fb38

File tree

13 files changed

+35
-22
lines changed

13 files changed

+35
-22
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
3232
refs/heads/batch: b5571ed71a5879c0495a982506258d5d267744ed
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34-
refs/heads/beta: 6b19a02080b816d0f416872e63f9b2dd90165c0f
34+
refs/heads/beta: 62ee3f1622183dfab2ed5894e9ab61deda416e9a
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928

branches/beta/src/librustc/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#![feature(rustc_diagnostic_macros)]
2929
#![feature(unboxed_closures)]
3030
#![feature(old_orphan_check)]
31+
#![feature(associated_types)]
3132

3233
extern crate arena;
3334
extern crate flate;

branches/beta/src/librustc/metadata/encoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ fn encode_enum_variant_info(ecx: &EncodeContext,
364364
}
365365
}
366366

367-
fn encode_path<PI: Iterator<PathElem>>(rbml_w: &mut Encoder, path: PI) {
367+
fn encode_path<PI: Iterator<Item=PathElem>>(rbml_w: &mut Encoder, path: PI) {
368368
let path = path.collect::<Vec<_>>();
369369
rbml_w.start_tag(tag_path);
370370
rbml_w.wr_tagged_u32(tag_path_len, path.len() as u32);

branches/beta/src/librustc/middle/cfg/construct.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
150150
}
151151
}
152152

153-
fn pats_all<'b, I: Iterator<&'b P<ast::Pat>>>(&mut self,
153+
fn pats_all<'b, I: Iterator<Item=&'b P<ast::Pat>>>(&mut self,
154154
pats: I,
155155
pred: CFGIndex) -> CFGIndex {
156156
//! Handles case where all of the patterns must match.
@@ -501,7 +501,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
501501
}
502502
}
503503

504-
fn call<'b, I: Iterator<&'b ast::Expr>>(&mut self,
504+
fn call<'b, I: Iterator<Item=&'b ast::Expr>>(&mut self,
505505
call_expr: &ast::Expr,
506506
pred: CFGIndex,
507507
func_or_rcvr: &ast::Expr,
@@ -521,7 +521,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
521521
}
522522
}
523523

524-
fn exprs<'b, I: Iterator<&'b ast::Expr>>(&mut self,
524+
fn exprs<'b, I: Iterator<Item=&'b ast::Expr>>(&mut self,
525525
exprs: I,
526526
pred: CFGIndex) -> CFGIndex {
527527
//! Constructs graph for `exprs` evaluated in order
@@ -535,7 +535,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
535535
opt_expr.iter().fold(pred, |p, e| self.expr(&**e, p))
536536
}
537537

538-
fn straightline<'b, I: Iterator<&'b ast::Expr>>(&mut self,
538+
fn straightline<'b, I: Iterator<Item=&'b ast::Expr>>(&mut self,
539539
expr: &ast::Expr,
540540
pred: CFGIndex,
541541
subexprs: I) -> CFGIndex {

branches/beta/src/librustc/middle/check_match.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ impl<'a> fmt::Show for Matrix<'a> {
9292
}
9393

9494
impl<'a> FromIterator<Vec<&'a Pat>> for Matrix<'a> {
95-
fn from_iter<T: Iterator<Vec<&'a Pat>>>(iterator: T) -> Matrix<'a> {
95+
fn from_iter<T: Iterator<Item=Vec<&'a Pat>>>(iterator: T) -> Matrix<'a> {
9696
Matrix(iterator.collect())
9797
}
9898
}

branches/beta/src/librustc/middle/const_eval.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ pub fn join(a: constness, b: constness) -> constness {
8181
}
8282
}
8383

84-
pub fn join_all<It: Iterator<constness>>(cs: It) -> constness {
84+
pub fn join_all<It: Iterator<Item=constness>>(cs: It) -> constness {
8585
cs.fold(integral_const, |a, b| join(a, b))
8686
}
8787

branches/beta/src/librustc/middle/graph.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,9 @@ pub struct DepthFirstTraversal<'g, N:'g, E:'g> {
305305
visited: BitvSet
306306
}
307307

308-
impl<'g, N, E> Iterator<&'g N> for DepthFirstTraversal<'g, N, E> {
308+
impl<'g, N, E> Iterator for DepthFirstTraversal<'g, N, E> {
309+
type Item = &'g N;
310+
309311
fn next(&mut self) -> Option<&'g N> {
310312
while let Some(idx) = self.stack.pop() {
311313
if !self.visited.insert(idx.node_id()) {

branches/beta/src/librustc/middle/subst.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,9 @@ impl<'a,T> EnumeratedItems<'a,T> {
494494
}
495495
}
496496

497-
impl<'a,T> Iterator<(ParamSpace, uint, &'a T)> for EnumeratedItems<'a,T> {
497+
impl<'a,T> Iterator for EnumeratedItems<'a,T> {
498+
type Item = (ParamSpace, uint, &'a T);
499+
498500
fn next(&mut self) -> Option<(ParamSpace, uint, &'a T)> {
499501
let spaces = ParamSpace::all();
500502
if self.space_index < spaces.len() {

branches/beta/src/librustc/middle/traits/select.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
297297
stack: Option<&TraitObligationStack<'o, 'tcx>>,
298298
mut predicates: I)
299299
-> EvaluationResult<'tcx>
300-
where I : Iterator<&'a PredicateObligation<'tcx>>, 'tcx:'a
300+
where I : Iterator<Item=&'a PredicateObligation<'tcx>>, 'tcx:'a
301301
{
302302
let mut result = EvaluatedToOk;
303303
for obligation in predicates {
@@ -2315,9 +2315,9 @@ impl<'o, 'tcx> TraitObligationStack<'o, 'tcx> {
23152315
}
23162316
}
23172317

2318-
impl<'o, 'tcx> Iterator<&'o TraitObligationStack<'o,'tcx>>
2319-
for Option<&'o TraitObligationStack<'o, 'tcx>>
2320-
{
2318+
impl<'o, 'tcx> Iterator for Option<&'o TraitObligationStack<'o, 'tcx>> {
2319+
type Item = &'o TraitObligationStack<'o,'tcx>;
2320+
23212321
fn next(&mut self) -> Option<&'o TraitObligationStack<'o, 'tcx>> {
23222322
match *self {
23232323
Some(o) => {

branches/beta/src/librustc/middle/traits/util.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,9 @@ impl<'cx, 'tcx> Elaborator<'cx, 'tcx> {
133133
}
134134
}
135135

136-
impl<'cx, 'tcx> Iterator<ty::Predicate<'tcx>> for Elaborator<'cx, 'tcx> {
136+
impl<'cx, 'tcx> Iterator for Elaborator<'cx, 'tcx> {
137+
type Item = ty::Predicate<'tcx>;
138+
137139
fn next(&mut self) -> Option<ty::Predicate<'tcx>> {
138140
loop {
139141
// Extract next item from top-most stack frame, if any.
@@ -197,7 +199,9 @@ pub fn transitive_bounds<'cx, 'tcx>(tcx: &'cx ty::ctxt<'tcx>,
197199
elaborate_trait_refs(tcx, bounds).filter_to_traits()
198200
}
199201

200-
impl<'cx, 'tcx> Iterator<ty::PolyTraitRef<'tcx>> for Supertraits<'cx, 'tcx> {
202+
impl<'cx, 'tcx> Iterator for Supertraits<'cx, 'tcx> {
203+
type Item = ty::PolyTraitRef<'tcx>;
204+
201205
fn next(&mut self) -> Option<ty::PolyTraitRef<'tcx>> {
202206
loop {
203207
match self.elaborator.next() {

branches/beta/src/librustc/middle/ty.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3716,10 +3716,10 @@ pub fn is_type_representable<'tcx>(cx: &ctxt<'tcx>, sp: Span, ty: Ty<'tcx>)
37163716
-> Representability {
37173717

37183718
// Iterate until something non-representable is found
3719-
fn find_nonrepresentable<'tcx, It: Iterator<Ty<'tcx>>>(cx: &ctxt<'tcx>, sp: Span,
3720-
seen: &mut Vec<Ty<'tcx>>,
3721-
iter: It)
3722-
-> Representability {
3719+
fn find_nonrepresentable<'tcx, It: Iterator<Item=Ty<'tcx>>>(cx: &ctxt<'tcx>, sp: Span,
3720+
seen: &mut Vec<Ty<'tcx>>,
3721+
iter: It)
3722+
-> Representability {
37233723
iter.fold(Representable,
37243724
|r, ty| cmp::max(r, is_type_structurally_recursive(cx, sp, seen, ty)))
37253725
}

branches/beta/src/librustc/middle/ty_walk.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ impl<'tcx> TypeWalker<'tcx> {
9494
}
9595
}
9696

97-
impl<'tcx> Iterator<Ty<'tcx>> for TypeWalker<'tcx> {
97+
impl<'tcx> Iterator for TypeWalker<'tcx> {
98+
type Item = Ty<'tcx>;
99+
98100
fn next(&mut self) -> Option<Ty<'tcx>> {
99101
debug!("next(): stack={}", self.stack);
100102
match self.stack.pop() {

branches/beta/src/librustc/session/search_paths.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ impl SearchPaths {
5353
}
5454
}
5555

56-
impl<'a> Iterator<&'a Path> for Iter<'a> {
56+
impl<'a> Iterator for Iter<'a> {
57+
type Item = &'a Path;
58+
5759
fn next(&mut self) -> Option<&'a Path> {
5860
loop {
5961
match self.iter.next() {

0 commit comments

Comments
 (0)