Skip to content

Commit 541c6b2

Browse files
committed
---
yaml --- r: 46877 b: refs/heads/auto c: 98ce99d h: refs/heads/master i: 46875: 1a8da0d v: v3
1 parent 68035af commit 541c6b2

File tree

3 files changed

+29
-11
lines changed

3 files changed

+29
-11
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: 06a336ae791ea8a8e618ff43a97b1e6e510c6601
17+
refs/heads/auto: 98ce99d500b13c79fd8e74e807167d8a59caf0e7

branches/auto/src/etc/kate/rust.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
</list>
1818
<list name="keywords">
1919
<item> as </item>
20-
<item> assert </item>
2120
<item> break </item>
2221
<item> const </item>
2322
<item> copy </item>
@@ -69,6 +68,7 @@
6968
<item> Shl </item>
7069
<item> Shr </item>
7170
<item> Index </item>
71+
<item> Not </item>
7272
</list>
7373
<list name="types">
7474
<item> bool </item>

branches/auto/src/libcore/vec.rs

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2268,27 +2268,45 @@ pub mod bytes {
22682268

22692269
// ___________________________________________________________________________
22702270
// ITERATION TRAIT METHODS
2271+
//
2272+
// This cannot be used with iter-trait.rs because of the region pointer
2273+
// required in the slice.
22712274

22722275
impl<A> iter::BaseIter<A> for &self/[A] {
2273-
#[inline(always)]
2274-
pure fn each(&self, blk: fn(v: &'self A) -> bool) { each(*self, blk) }
2275-
#[inline(always)]
2276+
pub pure fn each(&self, blk: fn(v: &A) -> bool) {
2277+
// FIXME(#2263)---should be able to call each(self, blk)
2278+
for each(*self) |e| {
2279+
if (!blk(e)) {
2280+
return;
2281+
}
2282+
}
2283+
}
22762284
pure fn size_hint(&self) -> Option<uint> { Some(len(*self)) }
22772285
}
22782286

22792287
// FIXME(#4148): This should be redundant
22802288
impl<A> iter::BaseIter<A> for ~[A] {
2281-
#[inline(always)]
2282-
pure fn each(&self, blk: fn(v: &'self A) -> bool) { each(*self, blk) }
2283-
#[inline(always)]
2289+
pub pure fn each(&self, blk: fn(v: &A) -> bool) {
2290+
// FIXME(#2263)---should be able to call each(self, blk)
2291+
for each(*self) |e| {
2292+
if (!blk(e)) {
2293+
return;
2294+
}
2295+
}
2296+
}
22842297
pure fn size_hint(&self) -> Option<uint> { Some(len(*self)) }
22852298
}
22862299

22872300
// FIXME(#4148): This should be redundant
22882301
impl<A> iter::BaseIter<A> for @[A] {
2289-
#[inline(always)]
2290-
pure fn each(&self, blk: fn(v: &'self A) -> bool) { each(*self, blk) }
2291-
#[inline(always)]
2302+
pub pure fn each(&self, blk: fn(v: &A) -> bool) {
2303+
// FIXME(#2263)---should be able to call each(self, blk)
2304+
for each(*self) |e| {
2305+
if (!blk(e)) {
2306+
return;
2307+
}
2308+
}
2309+
}
22922310
pure fn size_hint(&self) -> Option<uint> { Some(len(*self)) }
22932311
}
22942312

0 commit comments

Comments
 (0)