Skip to content

Commit 5ebc0f6

Browse files
committed
---
yaml --- r: 55609 b: refs/heads/master c: a7f6ec8 h: refs/heads/master i: 55607: 36b43f1 v: v3
1 parent 996d611 commit 5ebc0f6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1174
-2078
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: e4f35a7326e4ea2af9b6000080819208a7f6d722
2+
refs/heads/master: a7f6ec854223772bd5c445d6cd2a17a045009f72
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 79a2b2eafc3c766cecec8a5f76317693bae9ed17
55
refs/heads/try: 8eb2bab100b42f0ba751552d8eff00eb2134c55a

trunk/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,3 @@ config.stamp
8686
.DS_Store
8787
src/etc/dl
8888
.settings/
89-
build/

trunk/doc/tutorial.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1669,9 +1669,6 @@ do spawn {
16691669
}
16701670
~~~~
16711671

1672-
If you want to see the output of `debug!` statements, you will need to turn on `debug!` logging.
1673-
To enable `debug!` logging, set the RUST_LOG environment variable to `debug` (e.g., with bash, `export RUST_LOG=debug`)
1674-
16751672
## For loops
16761673

16771674
The most common way to express iteration in Rust is with a `for`

trunk/mk/rt.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ RUNTIME_CXXS_$(1) := \
7676
rt/boxed_region.cpp \
7777
rt/arch/$$(HOST_$(1))/context.cpp \
7878
rt/arch/$$(HOST_$(1))/gpr.cpp \
79-
rt/rust_android_dummy.cpp \
80-
rt/rust_test_helpers.cpp
79+
rt/rust_android_dummy.cpp
8180

8281
RUNTIME_CS_$(1) := rt/linenoise/linenoise.c rt/linenoise/utf8.c
8382

trunk/src/etc/x86.supp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -654,11 +654,3 @@
654654
fun:_ZN5visit30visit_struct_dtor_helper_*
655655
...
656656
}
657-
658-
{
659-
llvm-optimization-reads-uninitialized-memory-16
660-
Memcheck:Cond
661-
fun:_ZN7ast_map6map_fn*
662-
fun:_ZN5visit30visit_struct_dtor_helper*
663-
...
664-
}

trunk/src/libcore/io.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ pub trait ReaderUtil {
176176
fn read_bytes(&self, len: uint) -> ~[u8];
177177

178178
/**
179-
* Reads up until a specific byte is seen or EOF.
179+
* Reads up until a specific character or EOF.
180180
*
181181
* The `include` parameter specifies if the character should be included
182182
* in the returned string.
@@ -185,7 +185,7 @@ pub trait ReaderUtil {
185185
*
186186
* None right now.
187187
*/
188-
fn read_until(&self, c: u8, include: bool) -> ~str;
188+
fn read_until(&self, c: char, include: bool) -> ~str;
189189

190190
/**
191191
* Reads up until the first '\n' or EOF.
@@ -577,7 +577,7 @@ impl<T:Reader> ReaderUtil for T {
577577
bytes
578578
}
579579

580-
fn read_until(&self, c: u8, include: bool) -> ~str {
580+
fn read_until(&self, c: char, include: bool) -> ~str {
581581
let mut bytes = ~[];
582582
loop {
583583
let ch = self.read_byte();
@@ -593,7 +593,7 @@ impl<T:Reader> ReaderUtil for T {
593593
}
594594

595595
fn read_line(&self) -> ~str {
596-
self.read_until('\n' as u8, false)
596+
self.read_until('\n', false)
597597
}
598598

599599
fn read_chars(&self, n: uint) -> ~[char] {
@@ -667,7 +667,7 @@ impl<T:Reader> ReaderUtil for T {
667667
}
668668

669669
fn read_c_str(&self) -> ~str {
670-
self.read_until(0u8, false)
670+
self.read_until(0 as char, false)
671671
}
672672

673673
fn read_whole_stream(&self) -> ~[u8] {
@@ -693,7 +693,7 @@ impl<T:Reader> ReaderUtil for T {
693693
// include the \n, so that we can distinguish an entirely empty
694694
// line read after "...\n", and the trailing empty line in
695695
// "...\n\n".
696-
let mut line = self.read_until('\n' as u8, true);
696+
let mut line = self.read_until('\n', true);
697697

698698
// blank line at the end of the reader is ignored
699699
if self.eof() && line.is_empty() { break; }

trunk/src/libcore/iterator.rs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ pub trait IteratorUtil<A> {
2222
// FIXME: #5898: should be called map
2323
fn transform<'r, B>(self, f: &'r fn(A) -> B) -> MapIterator<'r, A, B, Self>;
2424
fn filter<'r>(self, predicate: &'r fn(&A) -> bool) -> FilterIterator<'r, A, Self>;
25-
fn enumerate(self) -> EnumerateIterator<Self>;
2625
fn advance(&mut self, f: &fn(A) -> bool);
2726
}
2827

@@ -43,11 +42,6 @@ impl<A, T: Iterator<A>> IteratorUtil<A> for T {
4342
FilterIterator{iter: self, predicate: predicate}
4443
}
4544

46-
#[inline(always)]
47-
fn enumerate(self) -> EnumerateIterator<T> {
48-
EnumerateIterator{iter: self, count: 0}
49-
}
50-
5145
/// A shim implementing the `for` loop iteration protocol for iterator objects
5246
#[inline]
5347
fn advance(&mut self, f: &fn(A) -> bool) {
@@ -110,22 +104,3 @@ impl<'self, A, B, T: Iterator<A>> Iterator<B> for MapIterator<'self, A, B, T> {
110104
}
111105
}
112106
}
113-
114-
pub struct EnumerateIterator<T> {
115-
priv iter: T,
116-
priv count: uint
117-
}
118-
119-
impl<A, T: Iterator<A>> Iterator<(uint, A)> for EnumerateIterator<T> {
120-
#[inline]
121-
fn next(&mut self) -> Option<(uint, A)> {
122-
match self.iter.next() {
123-
Some(a) => {
124-
let ret = Some((self.count, a));
125-
self.count += 1;
126-
ret
127-
}
128-
_ => None
129-
}
130-
}
131-
}

trunk/src/libcore/num/f32.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,26 +288,32 @@ impl num::One for f32 {
288288

289289
#[cfg(notest)]
290290
impl ops::Add<f32,f32> for f32 {
291+
#[inline(always)]
291292
fn add(&self, other: &f32) -> f32 { *self + *other }
292293
}
293294
#[cfg(notest)]
294295
impl ops::Sub<f32,f32> for f32 {
296+
#[inline(always)]
295297
fn sub(&self, other: &f32) -> f32 { *self - *other }
296298
}
297299
#[cfg(notest)]
298300
impl ops::Mul<f32,f32> for f32 {
301+
#[inline(always)]
299302
fn mul(&self, other: &f32) -> f32 { *self * *other }
300303
}
301304
#[cfg(notest)]
302305
impl ops::Div<f32,f32> for f32 {
306+
#[inline(always)]
303307
fn div(&self, other: &f32) -> f32 { *self / *other }
304308
}
305309
#[cfg(notest)]
306310
impl ops::Modulo<f32,f32> for f32 {
311+
#[inline(always)]
307312
fn modulo(&self, other: &f32) -> f32 { *self % *other }
308313
}
309314
#[cfg(notest)]
310315
impl ops::Neg<f32> for f32 {
316+
#[inline(always)]
311317
fn neg(&self) -> f32 { -*self }
312318
}
313319

trunk/src/libcore/num/f64.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,26 +310,32 @@ impl num::One for f64 {
310310

311311
#[cfg(notest)]
312312
impl ops::Add<f64,f64> for f64 {
313+
#[inline(always)]
313314
fn add(&self, other: &f64) -> f64 { *self + *other }
314315
}
315316
#[cfg(notest)]
316317
impl ops::Sub<f64,f64> for f64 {
318+
#[inline(always)]
317319
fn sub(&self, other: &f64) -> f64 { *self - *other }
318320
}
319321
#[cfg(notest)]
320322
impl ops::Mul<f64,f64> for f64 {
323+
#[inline(always)]
321324
fn mul(&self, other: &f64) -> f64 { *self * *other }
322325
}
323326
#[cfg(notest)]
324327
impl ops::Div<f64,f64> for f64 {
328+
#[inline(always)]
325329
fn div(&self, other: &f64) -> f64 { *self / *other }
326330
}
327331
#[cfg(notest)]
328332
impl ops::Modulo<f64,f64> for f64 {
333+
#[inline(always)]
329334
fn modulo(&self, other: &f64) -> f64 { *self % *other }
330335
}
331336
#[cfg(notest)]
332337
impl ops::Neg<f64> for f64 {
338+
#[inline(always)]
333339
fn neg(&self) -> f64 { -*self }
334340
}
335341

0 commit comments

Comments
 (0)