Skip to content

Commit 6a7f5ac

Browse files
author
blake2-ppc
committed
---
yaml --- r: 64819 b: refs/heads/snap-stage3 c: 4b45f47 h: refs/heads/master i: 64817: 8bed96d 64815: 28f2c59 v: v3
1 parent 00bd370 commit 6a7f5ac

File tree

14 files changed

+140
-154
lines changed

14 files changed

+140
-154
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 1493141bfdb478c42fb073ef6872540de3b125f0
4+
refs/heads/snap-stage3: 4b45f478818386cfe8554e3a5595c2cf38541b45
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libextra/dlist.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
use std::cast;
2626
use std::ptr;
2727
use std::util;
28-
use std::iterator::{FromIterator, InvertIterator};
28+
use std::iterator::{FromIterator, Invert};
2929

3030
use container::Deque;
3131

@@ -356,7 +356,7 @@ impl<T> DList<T> {
356356

357357
/// Provide a reverse iterator
358358
#[inline]
359-
pub fn rev_iter<'a>(&'a self) -> InvertIterator<DListIterator<'a, T>> {
359+
pub fn rev_iter<'a>(&'a self) -> Invert<DListIterator<'a, T>> {
360360
self.iter().invert()
361361
}
362362

@@ -376,7 +376,7 @@ impl<T> DList<T> {
376376
}
377377
/// Provide a reverse iterator with mutable references
378378
#[inline]
379-
pub fn mut_rev_iter<'a>(&'a mut self) -> InvertIterator<MutDListIterator<'a, T>> {
379+
pub fn mut_rev_iter<'a>(&'a mut self) -> Invert<MutDListIterator<'a, T>> {
380380
self.mut_iter().invert()
381381
}
382382

@@ -389,7 +389,7 @@ impl<T> DList<T> {
389389

390390
/// Consume the list into an iterator yielding elements by value, in reverse
391391
#[inline]
392-
pub fn consume_rev_iter(self) -> InvertIterator<ConsumeIterator<T>> {
392+
pub fn consume_rev_iter(self) -> Invert<ConsumeIterator<T>> {
393393
self.consume_iter().invert()
394394
}
395395
}

branches/snap-stage3/src/libextra/ringbuf.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use std::num;
1717
use std::uint;
1818
use std::vec;
19-
use std::iterator::{FromIterator, InvertIterator};
19+
use std::iterator::{FromIterator, Invert};
2020

2121
use container::Deque;
2222

@@ -181,7 +181,7 @@ impl<T> RingBuf<T> {
181181
}
182182

183183
/// Back-to-front iterator.
184-
pub fn rev_iter<'a>(&'a self) -> InvertIterator<RingBufIterator<'a, T>> {
184+
pub fn rev_iter<'a>(&'a self) -> Invert<RingBufIterator<'a, T>> {
185185
self.iter().invert()
186186
}
187187

@@ -192,7 +192,7 @@ impl<T> RingBuf<T> {
192192
}
193193

194194
/// Back-to-front iterator which returns mutable values.
195-
pub fn mut_rev_iter<'a>(&'a mut self) -> InvertIterator<RingBufMutIterator<'a, T>> {
195+
pub fn mut_rev_iter<'a>(&'a mut self) -> Invert<RingBufMutIterator<'a, T>> {
196196
self.mut_iter().invert()
197197
}
198198
}

branches/snap-stage3/src/libextra/smallintmap.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#[allow(missing_doc)];
1717

18-
use std::iterator::{Iterator, IteratorUtil, EnumerateIterator, FilterMapIterator, InvertIterator};
18+
use std::iterator::{Iterator, IteratorUtil, Enumerate, FilterMap, Invert};
1919
use std::uint;
2020
use std::util::replace;
2121
use std::vec::{VecIterator, VecMutIterator};
@@ -204,8 +204,8 @@ impl<V> SmallIntMap<V> {
204204

205205
/// Empties the hash map, moving all values into the specified closure
206206
pub fn consume(&mut self)
207-
-> FilterMapIterator<(uint, Option<V>), (uint, V),
208-
EnumerateIterator<vec::ConsumeIterator<Option<V>>>>
207+
-> FilterMap<(uint, Option<V>), (uint, V),
208+
Enumerate<vec::ConsumeIterator<Option<V>>>>
209209
{
210210
let values = replace(&mut self.v, ~[]);
211211
values.consume_iter().enumerate().filter_map(|(i, v)| {
@@ -291,7 +291,7 @@ pub struct SmallIntMapIterator<'self, T> {
291291

292292
iterator!(impl SmallIntMapIterator -> (uint, &'self T), get_ref)
293293
double_ended_iterator!(impl SmallIntMapIterator -> (uint, &'self T), get_ref)
294-
pub type SmallIntMapRevIterator<'self, T> = InvertIterator<SmallIntMapIterator<'self, T>>;
294+
pub type SmallIntMapRevIterator<'self, T> = Invert<SmallIntMapIterator<'self, T>>;
295295

296296
pub struct SmallIntMapMutIterator<'self, T> {
297297
priv front: uint,
@@ -301,7 +301,7 @@ pub struct SmallIntMapMutIterator<'self, T> {
301301

302302
iterator!(impl SmallIntMapMutIterator -> (uint, &'self mut T), get_mut_ref)
303303
double_ended_iterator!(impl SmallIntMapMutIterator -> (uint, &'self mut T), get_mut_ref)
304-
pub type SmallIntMapMutRevIterator<'self, T> = InvertIterator<SmallIntMapMutIterator<'self, T>>;
304+
pub type SmallIntMapMutRevIterator<'self, T> = Invert<SmallIntMapMutIterator<'self, T>>;
305305

306306
#[cfg(test)]
307307
mod test_map {

branches/snap-stage3/src/librustc/middle/check_const.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ pub fn check_expr(sess: Session,
160160
expr_field(*) |
161161
expr_index(*) |
162162
expr_tup(*) |
163-
expr_struct(*) => { }
163+
expr_struct(_, _, None) => { }
164164
expr_addr_of(*) => {
165165
sess.span_err(
166166
e.span,

branches/snap-stage3/src/librustc/middle/trans/consts.rs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -485,30 +485,20 @@ fn const_expr_unadjusted(cx: @mut CrateContext, e: &ast::expr) -> ValueRef {
485485
let vals = es.map(|&e| const_expr(cx, e));
486486
adt::trans_const(cx, repr, 0, vals)
487487
}
488-
ast::expr_struct(_, ref fs, ref base_opt) => {
488+
ast::expr_struct(_, ref fs, None) => {
489489
let ety = ty::expr_ty(cx.tcx, e);
490490
let repr = adt::represent_type(cx, ety);
491491
let tcx = cx.tcx;
492-
493-
let base_val = match *base_opt {
494-
Some(base) => Some(const_expr(cx, base)),
495-
None => None
496-
};
497-
498492
do expr::with_field_tys(tcx, ety, Some(e.id))
499493
|discr, field_tys| {
500-
let cs: ~[ValueRef] = field_tys.iter().enumerate()
501-
.transform(|(ix, &field_ty)| {
494+
let cs = field_tys.map(|field_ty| {
502495
match fs.iter().find_(|f| field_ty.ident == f.ident) {
503496
Some(f) => const_expr(cx, (*f).expr),
504497
None => {
505-
match base_val {
506-
Some(bv) => adt::const_get_field(cx, repr, bv, discr, ix),
507-
None => cx.tcx.sess.span_bug(e.span, "missing struct field")
508-
}
498+
cx.tcx.sess.span_bug(e.span, "missing struct field");
509499
}
510500
}
511-
}).collect();
501+
});
512502
adt::trans_const(cx, repr, discr, cs)
513503
}
514504
}

branches/snap-stage3/src/libstd/hashmap.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use container::{Container, Mutable, Map, MutableMap, Set, MutableSet};
1919
use clone::Clone;
2020
use cmp::{Eq, Equiv};
2121
use hash::Hash;
22-
use iterator::{Iterator, IteratorUtil, FromIterator, ChainIterator};
22+
use iterator::{Iterator, IteratorUtil, FromIterator, Chain};
2323
use num;
2424
use option::{None, Option, Some};
2525
use rand::RngUtil;
@@ -751,7 +751,7 @@ impl<T:Hash + Eq> HashSet<T> {
751751

752752
/// Visit the values representing the symmetric difference
753753
pub fn symmetric_difference_iter<'a>(&'a self, other: &'a HashSet<T>)
754-
-> ChainIterator<SetAlgebraIter<'a, T>, SetAlgebraIter<'a, T>> {
754+
-> Chain<SetAlgebraIter<'a, T>, SetAlgebraIter<'a, T>> {
755755
self.difference_iter(other).chain_(other.difference_iter(self))
756756
}
757757

@@ -764,7 +764,7 @@ impl<T:Hash + Eq> HashSet<T> {
764764

765765
/// Visit the values representing the union
766766
pub fn union_iter<'a>(&'a self, other: &'a HashSet<T>)
767-
-> ChainIterator<HashSetIterator<'a, T>, SetAlgebraIter<'a, T>> {
767+
-> Chain<HashSetIterator<'a, T>, SetAlgebraIter<'a, T>> {
768768
self.iter().chain_(other.difference_iter(self))
769769
}
770770

0 commit comments

Comments
 (0)