Skip to content

Commit c5b4969

Browse files
committed
---
yaml --- r: 49454 b: refs/heads/master c: 6aa612a h: refs/heads/master v: v3
1 parent ef1d360 commit c5b4969

Some content is hidden

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

69 files changed

+792
-459
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: f36f9fc91ccc86c7004979689da981184559e57a
2+
refs/heads/master: 6aa612a909a9df24dacc8468a4a1a68b6484dab7
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: f7a2371c176663d59062ec5158f39faecba45768
55
refs/heads/try: 2a8fb58d79e685d5ca07b039badcf2ae3ef077ea

trunk/src/compiletest/errors.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ fn parse_expected(line_num: uint, line: ~str) -> ~[ExpectedError] {
5151
while idx < len && line[idx] == (' ' as u8) { idx += 1u; }
5252
let start_kind = idx;
5353
while idx < len && line[idx] != (' ' as u8) { idx += 1u; }
54-
let kind = str::to_lower(str::slice(line, start_kind, idx));
54+
let kind = str::to_lower(str::slice(line, start_kind, idx).to_owned());
5555

5656
// Extract msg:
5757
while idx < len && line[idx] == (' ' as u8) { idx += 1u; }
58-
let msg = str::slice(line, idx, len);
58+
let msg = str::slice(line, idx, len).to_owned();
5959

6060
debug!("line=%u kind=%s msg=%s", line_num - adjust_line, kind, msg);
6161

trunk/src/compiletest/header.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ fn parse_name_value_directive(line: ~str,
175175
match str::find_str(line, keycolon) {
176176
Some(colon) => {
177177
let value = str::slice(line, colon + str::len(keycolon),
178-
str::len(line));
178+
str::len(line)).to_owned();
179179
debug!("%s: %s", directive, value);
180180
Some(value)
181181
}

trunk/src/etc/x86.supp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,21 @@
451451
fun:*uv_loop_delete*
452452
}
453453

454+
{
455+
race-or-something-ask-pcwalton-0
456+
Memcheck:Value4
457+
fun:*task_start_wrapper*
458+
...
459+
}
460+
461+
{
462+
race-or-something-ask-pcwalton-1
463+
Memcheck:Value4
464+
...
465+
fun:*build_start_wrapper*
466+
...
467+
}
468+
454469
{
455470
lock_and_signal-probably-threadsafe-access-outside-of-lock
456471
Helgrind:Race

trunk/src/libcore/comm.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ pub fn stream<T:Owned>() -> (Port<T>, Chan<T>) {
110110
// required.
111111
#[cfg(stage1)]
112112
#[cfg(stage2)]
113+
#[cfg(stage3)]
113114
pub impl<T: Owned> Chan<T> {
114115
fn send(&self, x: T) { chan_send(self, x) }
115116
fn try_send(&self, x: T) -> bool { chan_try_send(self, x) }
@@ -149,6 +150,7 @@ fn chan_try_send<T:Owned>(self: &Chan<T>, x: T) -> bool {
149150
// Use an inherent impl so that imports are not required:
150151
#[cfg(stage1)]
151152
#[cfg(stage2)]
153+
#[cfg(stage3)]
152154
pub impl<T: Owned> Port<T> {
153155
fn recv(&self) -> T { port_recv(self) }
154156
fn try_recv(&self) -> Option<T> { port_try_recv(self) }
@@ -226,6 +228,7 @@ pub fn PortSet<T: Owned>() -> PortSet<T>{
226228
// Use an inherent impl so that imports are not required:
227229
#[cfg(stage1)]
228230
#[cfg(stage2)]
231+
#[cfg(stage3)]
229232
pub impl<T:Owned> PortSet<T> {
230233
fn recv(&self) -> T { port_set_recv(self) }
231234
fn try_recv(&self) -> Option<T> { port_set_try_recv(self) }
@@ -301,6 +304,7 @@ pub type SharedChan<T> = unstable::Exclusive<Chan<T>>;
301304
302305
#[cfg(stage1)]
303306
#[cfg(stage2)]
307+
#[cfg(stage3)]
304308
pub impl<T: Owned> SharedChan<T> {
305309
fn send(&self, x: T) { shared_chan_send(self, x) }
306310
fn try_send(&self, x: T) -> bool { shared_chan_try_send(self, x) }

trunk/src/libcore/io.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ use libc;
2121
use libc::{c_int, c_long, c_uint, c_void, size_t, ssize_t};
2222
use libc::consts::os::posix88::*;
2323
use os;
24-
use prelude::*;
24+
use cast;
25+
use path::Path;
26+
use ops::Drop;
2527
use ptr;
2628
use result;
2729
use str;
@@ -75,6 +77,7 @@ pub trait Reader {
7577

7678
#[cfg(stage1)]
7779
#[cfg(stage2)]
80+
#[cfg(stage3)]
7881
impl Reader for @Reader {
7982
fn read(&self, bytes: &mut [u8], len: uint) -> uint {
8083
self.read(bytes, len)
@@ -657,6 +660,7 @@ pub trait Writer {
657660
658661
#[cfg(stage1)]
659662
#[cfg(stage2)]
663+
#[cfg(stage3)]
660664
impl Writer for @Writer {
661665
fn write(&self, v: &[const u8]) { self.write(v) }
662666
fn seek(&self, a: int, b: SeekStyle) { self.seek(a, b) }
@@ -986,7 +990,7 @@ pub trait WriterUtil {
986990

987991
impl<T:Writer> WriterUtil for T {
988992
fn write_char(&self, ch: char) {
989-
if ch as uint < 128u {
993+
if (ch as uint) < 128u {
990994
self.write(&[ch as u8]);
991995
} else {
992996
self.write_str(str::from_char(ch));
@@ -1200,9 +1204,11 @@ pub fn read_whole_file(file: &Path) -> Result<~[u8], ~str> {
12001204
// fsync related
12011205

12021206
pub mod fsync {
1203-
use prelude::*;
12041207
use io::{FILERes, FdRes, fd_t};
1208+
use kinds::Copy;
12051209
use libc;
1210+
use ops::Drop;
1211+
use option::{None, Option, Some};
12061212
use os;
12071213

12081214
pub enum Level {

trunk/src/libcore/libc.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,6 @@ pub mod types {
230230
pub type uintptr_t = uint;
231231
}
232232
pub mod posix88 {
233-
use prelude::*;
234-
235233
pub type off_t = i32;
236234
pub type dev_t = u64;
237235
pub type ino_t = u32;

trunk/src/libcore/num/strconv.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ pub pure fn to_str_bytes_common<T:NumCast+Zero+One+Eq+Ord+NumStrConv+Copy+
165165
Div<T,T>+Neg<T>+Modulo<T,T>+Mul<T,T>>(
166166
num: &T, radix: uint, negative_zero: bool,
167167
sign: SignFormat, digits: SignificantDigits) -> (~[u8], bool) {
168-
if radix as int < 2 {
168+
if (radix as int) < 2 {
169169
fail!(fmt!("to_str_bytes_common: radix %? to low, \
170170
must lie in the range [2, 36]", radix));
171171
} else if radix as int > 36 {
@@ -364,14 +364,14 @@ pub pure fn to_str_bytes_common<T:NumCast+Zero+One+Eq+Ord+NumStrConv+Copy+
364364

365365
// only resize buf if we actually remove digits
366366
if i < buf_max_i {
367-
buf = buf.slice(0, i + 1);
367+
buf = buf.slice(0, i + 1).to_owned();
368368
}
369369
}
370370
} // If exact and trailing '.', just cut that
371371
else {
372372
let max_i = buf.len() - 1;
373373
if buf[max_i] == '.' as u8 {
374-
buf = buf.slice(0, max_i);
374+
buf = buf.slice(0, max_i).to_owned();
375375
}
376376
}
377377

@@ -455,10 +455,10 @@ pub pure fn from_str_bytes_common<T:NumCast+Zero+One+Ord+Copy+Div<T,T>+
455455
_ if special && radix >= DIGIT_I_RADIX // first digit of 'inf'
456456
=> fail!(fmt!("from_str_bytes_common: radix %? incompatible with \
457457
special values 'inf' and 'NaN'", radix)),
458-
_ if radix as int < 2
458+
_ if (radix as int) < 2
459459
=> fail!(fmt!("from_str_bytes_common: radix %? to low, \
460460
must lie in the range [2, 36]", radix)),
461-
_ if radix as int > 36
461+
_ if (radix as int) > 36
462462
=> fail!(fmt!("from_str_bytes_common: radix %? to high, \
463463
must lie in the range [2, 36]", radix)),
464464
_ => ()
@@ -606,7 +606,7 @@ pub pure fn from_str_bytes_common<T:NumCast+Zero+One+Ord+Copy+Div<T,T>+
606606
// parse remaining bytes as decimal integer,
607607
// skipping the exponent char
608608
let exp: Option<int> = from_str_bytes_common(
609-
buf.view(i+1, len), 10, true, false, false, ExpNone, false);
609+
buf.slice(i+1, len), 10, true, false, false, ExpNone, false);
610610

611611
match exp {
612612
Some(exp_pow) => {

trunk/src/libcore/path.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ impl GenericPath for PosixPath {
410410
None => None,
411411
Some(ref f) => {
412412
match str::rfind_char(*f, '.') {
413-
Some(p) => Some(f.slice(0, p)),
413+
Some(p) => Some(f.slice(0, p).to_owned()),
414414
None => Some(copy *f)
415415
}
416416
}
@@ -422,7 +422,7 @@ impl GenericPath for PosixPath {
422422
None => None,
423423
Some(ref f) => {
424424
match str::rfind_char(*f, '.') {
425-
Some(p) if p < f.len() => Some(f.slice(p, f.len())),
425+
Some(p) if p < f.len() => Some(f.slice(p, f.len()).to_owned()),
426426
_ => None
427427
}
428428
}
@@ -622,7 +622,7 @@ impl GenericPath for WindowsPath {
622622
None => None,
623623
Some(ref f) => {
624624
match str::rfind_char(*f, '.') {
625-
Some(p) => Some(f.slice(0, p)),
625+
Some(p) => Some(f.slice(0, p).to_owned()),
626626
None => Some(copy *f)
627627
}
628628
}
@@ -634,7 +634,7 @@ impl GenericPath for WindowsPath {
634634
None => None,
635635
Some(ref f) => {
636636
match str::rfind_char(*f, '.') {
637-
Some(p) if p < f.len() => Some(f.slice(p, f.len())),
637+
Some(p) if p < f.len() => Some(f.slice(p, f.len()).to_owned()),
638638
_ => None
639639
}
640640
}
@@ -842,8 +842,8 @@ pub mod windows {
842842
let mut i = 2;
843843
while i < s.len() {
844844
if is_sep(s[i]) {
845-
let pre = s.slice(2, i);
846-
let mut rest = s.slice(i, s.len());
845+
let pre = s.slice(2, i).to_owned();
846+
let mut rest = s.slice(i, s.len()).to_owned();
847847
return Some((pre, rest));
848848
}
849849
i += 1;
@@ -860,9 +860,9 @@ pub mod windows {
860860
let rest = if s.len() == 2 {
861861
~""
862862
} else {
863-
s.slice(2, s.len())
863+
s.slice(2, s.len()).to_owned()
864864
};
865-
return Some((s.slice(0,1), rest));
865+
return Some((s.slice(0,1).to_owned(), rest));
866866
}
867867
None
868868
}

trunk/src/libcore/prelude.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ pub use tuple::{CopyableTuple, ImmutableTuple, ExtendedTupleOps};
4343
pub use vec::{CopyableVector, ImmutableVector};
4444
pub use vec::{ImmutableEqVector, ImmutableCopyableVector};
4545
pub use vec::{OwnedVector, OwnedCopyableVector};
46+
pub use io::{Reader, ReaderUtil, Writer, WriterUtil};
4647

4748
/* Reexported runtime types */
4849
pub use comm::{stream, Port, Chan, GenericChan, GenericSmartChan, GenericPort, Peekable};

trunk/src/libcore/repr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ pub impl ReprVisitor {
218218

219219
fn write_escaped_slice(&self, slice: &str) {
220220
self.writer.write_char('"');
221-
for str::chars_each(slice) |ch| {
221+
for slice.each_char |ch| {
222222
self.writer.write_escaped_char(ch);
223223
}
224224
self.writer.write_char('"');
@@ -242,7 +242,7 @@ pub impl ReprVisitor {
242242
let (sz, al) = unsafe { ((*inner).size, (*inner).align) };
243243
self.writer.write_char('[');
244244
let mut first = true;
245-
while p as uint < end as uint {
245+
while (p as uint) < (end as uint) {
246246
if first {
247247
first = false;
248248
} else {

trunk/src/libcore/rt/uv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ fn listen() {
878878
if status.is_none() {
879879
rtdebug!("got %d bytes", nread);
880880
let buf = buf.unwrap();
881-
for buf.view(0, nread as uint).each |byte| {
881+
for buf.slice(0, nread as uint).each |byte| {
882882
fail_unless!(*byte == count as u8);
883883
rtdebug!("%u", *byte as uint);
884884
count += 1;

trunk/src/libcore/run.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ fn read_all(rd: io::Reader) -> ~str {
303303
let mut bytes = [0, ..4096];
304304
while !rd.eof() {
305305
let nread = rd.read(bytes, bytes.len());
306-
wr.write(bytes.view(0, nread));
306+
wr.write(bytes.slice(0, nread));
307307
}
308308
});
309309
str::from_bytes(buf)
@@ -404,7 +404,7 @@ pub fn readclose(fd: c_int) -> ~str {
404404
let mut bytes = [0, ..4096];
405405
while !reader.eof() {
406406
let nread = reader.read(bytes, bytes.len());
407-
writer.write(bytes.view(0, nread));
407+
writer.write(bytes.slice(0, nread));
408408
}
409409
});
410410
os::fclose(file);

0 commit comments

Comments
 (0)