Skip to content

Commit aa8de38

Browse files
committed
---
yaml --- r: 130231 b: refs/heads/master c: 9e82fc7 h: refs/heads/master i: 130229: f214537 130227: 0477602 130223: 2fb5c3e v: v3
1 parent 0af6044 commit aa8de38

File tree

148 files changed

+4955
-7527
lines changed

Some content is hidden

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

148 files changed

+4955
-7527
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: 6eabd85265e18b47942dac7cf3f258e38d9d9f2e
2+
refs/heads/master: 9e82fc7ef9b6c8a344dd27583990b02a661af78c
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 67b97ab6d2b7de9b69fd97dc171fcf8feec932ff
55
refs/heads/try: 28d5878c1f0465c11c8e7a3085008b0c592d48d0

trunk/src/compiletest/runtest.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,10 @@ fn _arm_push_aux_shared_library(config: &Config, testfile: &Path) {
15771577

15781578
// codegen tests (vs. clang)
15791579

1580+
fn make_o_name(config: &Config, testfile: &Path) -> Path {
1581+
output_base_name(config, testfile).with_extension("o")
1582+
}
1583+
15801584
fn append_suffix_to_stem(p: &Path, suffix: &str) -> Path {
15811585
if suffix.len() == 0 {
15821586
(*p).clone()
@@ -1592,13 +1596,14 @@ fn compile_test_and_save_bitcode(config: &Config, props: &TestProps,
15921596
// FIXME (#9639): This needs to handle non-utf8 paths
15931597
let link_args = vec!("-L".to_string(),
15941598
aux_dir.as_str().unwrap().to_string());
1595-
let llvm_args = vec!("--emit=bc,obj".to_string(),
1596-
"--crate-type=lib".to_string());
1599+
let llvm_args = vec!("--emit=obj".to_string(),
1600+
"--crate-type=lib".to_string(),
1601+
"-C".to_string(),
1602+
"save-temps".to_string());
15971603
let args = make_compile_args(config,
15981604
props,
15991605
link_args.append(llvm_args.as_slice()),
1600-
|a, b| ThisDirectory(output_base_name(a, b).dir_path()),
1601-
testfile);
1606+
|a, b| ThisFile(make_o_name(a, b)), testfile);
16021607
compose_and_run_compiler(config, props, testfile, args, None)
16031608
}
16041609

trunk/src/doc/rust.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2221,8 +2221,8 @@ These types help drive the compiler's analysis
22212221
: This type does not implement "copy", even if eligible
22222222
* `no_send_bound`
22232223
: This type does not implement "send", even if eligible
2224-
* `no_sync_bound`
2225-
: This type does not implement "sync", even if eligible
2224+
* `no_share_bound`
2225+
: This type does not implement "share", even if eligible
22262226
* `eh_personality`
22272227
: ___Needs filling in___
22282228
* `exchange_free`

trunk/src/driver/driver.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
// except according to those terms.
1010

1111
#[cfg(rustdoc)]
12-
extern crate "rustdoc" as this;
12+
extern crate this = "rustdoc";
1313

1414
#[cfg(rustc)]
15-
extern crate "rustc" as this;
15+
extern crate this = "rustc";
1616

1717
fn main() { this::main() }

trunk/src/libcollections/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ pub trait Set<T>: Collection {
289289
}
290290

291291
/// A mutable collection of values which are distinct from one another that
292-
/// can be mutated.
292+
/// can be mutaed.
293293
pub trait MutableSet<T>: Set<T> + Mutable {
294294
/// Adds a value to the set. Returns `true` if the value was not already
295295
/// present in the set.

trunk/src/libcollections/ringbuf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ impl<T> RingBuf<T> {
132132
elts: Vec::from_fn(cmp::max(MINIMUM_CAPACITY, n), |_| None)}
133133
}
134134

135-
/// Retrieve an element in the `RingBuf` by index.
135+
/// Retrieva an element in the `RingBuf` by index.
136136
///
137137
/// Fails if there is no element with the given index.
138138
///

trunk/src/libcollections/slice.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ use vec::Vec;
9696
pub use core::slice::{Chunks, Slice, ImmutableSlice, ImmutablePartialEqSlice};
9797
pub use core::slice::{ImmutableOrdSlice, MutableSlice, Items, MutItems};
9898
pub use core::slice::{MutSplits, MutChunks, Splits};
99-
pub use core::slice::{bytes, mut_ref_slice, ref_slice, MutableCloneableSlice};
99+
pub use core::slice::{bytes, ref_slice, MutableCloneableSlice};
100100
pub use core::slice::{Found, NotFound};
101101

102102
// Functional utilities

trunk/src/libcollections/smallintmap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ impl<V:Clone> SmallIntMap<V> {
324324
/// Updates a value in the map. If the key already exists in the map,
325325
/// modifies the value with `ff` taking `oldval, newval`.
326326
/// Otherwise, sets the value to `newval`.
327-
/// Returns `true` if the key did not already exist in the map.
327+
/// Returasn `true` if the key did not already exist in the map.
328328
///
329329
/// # Example
330330
///

trunk/src/libcollections/str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
//!
4545
//! # Representation
4646
//!
47-
//! Rust's string type, `str`, is a sequence of Unicode scalar values encoded as a
47+
//! Rust's string type, `str`, is a sequence of unicode scalar values encoded as a
4848
//! stream of UTF-8 bytes. All strings are guaranteed to be validly encoded UTF-8
4949
//! sequences. Additionally, strings are not null-terminated and can contain null
5050
//! bytes.

trunk/src/libcore/char.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ pub fn escape_unicode(c: char, f: |char|) {
201201
/// - Tab, CR and LF are escaped as '\t', '\r' and '\n' respectively.
202202
/// - Single-quote, double-quote and backslash chars are backslash-escaped.
203203
/// - Any other chars in the range [0x20,0x7e] are not escaped.
204-
/// - Any other chars are given hex Unicode escapes; see `escape_unicode`.
204+
/// - Any other chars are given hex unicode escapes; see `escape_unicode`.
205205
///
206206
pub fn escape_default(c: char, f: |char|) {
207207
match c {
@@ -290,7 +290,7 @@ pub trait Char {
290290
/// * Single-quote, double-quote and backslash chars are backslash-
291291
/// escaped.
292292
/// * Any other chars in the range [0x20,0x7e] are not escaped.
293-
/// * Any other chars are given hex Unicode escapes; see `escape_unicode`.
293+
/// * Any other chars are given hex unicode escapes; see `escape_unicode`.
294294
fn escape_default(&self, f: |char|);
295295

296296
/// Returns the amount of bytes this character would need if encoded in

trunk/src/libcore/fmt/mod.rs

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -461,28 +461,19 @@ impl<'a> Formatter<'a> {
461461
use char::Char;
462462
let align = match self.align {
463463
rt::AlignUnknown => default,
464-
_ => self.align
464+
rt::AlignLeft | rt::AlignRight => self.align
465465
};
466-
467-
let (pre_pad, post_pad) = match align {
468-
rt::AlignLeft => (0u, padding),
469-
rt::AlignRight | rt::AlignUnknown => (padding, 0u),
470-
rt::AlignCenter => (padding / 2, (padding + 1) / 2),
471-
};
472-
466+
if align == rt::AlignLeft {
467+
try!(f(self));
468+
}
473469
let mut fill = [0u8, ..4];
474470
let len = self.fill.encode_utf8(fill).unwrap_or(0);
475-
476-
for _ in range(0, pre_pad) {
471+
for _ in range(0, padding) {
477472
try!(self.buf.write(fill.slice_to(len)));
478473
}
479-
480-
try!(f(self));
481-
482-
for _ in range(0, post_pad) {
483-
try!(self.buf.write(fill.slice_to(len)));
474+
if align == rt::AlignRight {
475+
try!(f(self));
484476
}
485-
486477
Ok(())
487478
}
488479

trunk/src/libcore/fmt/rt.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ pub enum Alignment {
4343
AlignLeft,
4444
/// Indication that contents should be right-aligned.
4545
AlignRight,
46-
/// Indication that contents should be center-aligned.
47-
AlignCenter,
4846
/// No alignment was requested.
4947
AlignUnknown,
5048
}

trunk/src/libcore/intrinsics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ extern "rust-intrinsic" {
311311

312312
/// Gives the address for the return value of the enclosing function.
313313
///
314-
/// Using this intrinsic in a function that does not use an out pointer
314+
/// Using this instrinsic in a function that does not use an out pointer
315315
/// will trigger a compiler error.
316316
pub fn return_address() -> *const u8;
317317

trunk/src/libcore/kinds.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ pub mod marker {
271271
/// A type which is considered "not sync", meaning that
272272
/// its contents are not threadsafe, hence they cannot be
273273
/// shared between tasks.
274-
#[lang="no_sync_bound"]
274+
#[lang="no_share_bound"]
275275
#[deriving(PartialEq,Clone)]
276276
pub struct NoSync;
277277

trunk/src/libcore/str.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,7 +1128,7 @@ pub trait StrSlice<'a> {
11281128
fn contains_char(&self, needle: char) -> bool;
11291129

11301130
/// An iterator over the characters of `self`. Note, this iterates
1131-
/// over Unicode code-points, not Unicode graphemes.
1131+
/// over unicode code-points, not unicode graphemes.
11321132
///
11331133
/// # Example
11341134
///
@@ -1505,7 +1505,7 @@ pub trait StrSlice<'a> {
15051505
/// Pluck a character out of a string and return the index of the next
15061506
/// character.
15071507
///
1508-
/// This function can be used to iterate over the Unicode characters of a
1508+
/// This function can be used to iterate over the unicode characters of a
15091509
/// string.
15101510
///
15111511
/// # Example
@@ -1549,7 +1549,7 @@ pub trait StrSlice<'a> {
15491549
/// # Return value
15501550
///
15511551
/// A record {ch: char, next: uint} containing the char value and the byte
1552-
/// index of the next Unicode character.
1552+
/// index of the next unicode character.
15531553
///
15541554
/// # Failure
15551555
///
@@ -1559,7 +1559,7 @@ pub trait StrSlice<'a> {
15591559

15601560
/// Given a byte position and a str, return the previous char and its position.
15611561
///
1562-
/// This function can be used to iterate over a Unicode string in reverse.
1562+
/// This function can be used to iterate over a unicode string in reverse.
15631563
///
15641564
/// Returns 0 for next index if called on start index 0.
15651565
///

trunk/src/libfmt_macros/lib.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ pub enum Alignment {
8181
AlignLeft,
8282
/// The value will be aligned to the right.
8383
AlignRight,
84-
/// The value will be aligned in the center.
85-
AlignCenter,
8684
/// The value will take on a default alignment.
8785
AlignUnknown,
8886
}
@@ -281,7 +279,7 @@ impl<'a> Parser<'a> {
281279
match self.cur.clone().next() {
282280
Some((_, c)) => {
283281
match self.cur.clone().skip(1).next() {
284-
Some((_, '>')) | Some((_, '<')) | Some((_, '^')) => {
282+
Some((_, '>')) | Some((_, '<')) => {
285283
spec.fill = Some(c);
286284
self.cur.next();
287285
}
@@ -295,8 +293,6 @@ impl<'a> Parser<'a> {
295293
spec.align = AlignLeft;
296294
} else if self.consume('>') {
297295
spec.align = AlignRight;
298-
} else if self.consume('^') {
299-
spec.align = AlignCenter;
300296
}
301297
// Sign flags
302298
if self.consume('+') {

trunk/src/libglob/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,6 @@ mod test {
680680
}
681681

682682
#[test]
683-
#[ignore(cfg(windows))] // FIXME (#9406)
684683
fn test_lots_of_files() {
685684
// this is a good test because it touches lots of differently named files
686685
glob("/*/*/*/*").skip(10000).next();

trunk/src/liblibc/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
* definitions common-to-all (held in modules named c95, c99, posix88, posix01
6666
* and posix08) and definitions that appear only on *some* platforms (named
6767
* 'extra'). This would be things like significant OSX foundation kit, or Windows
68-
* library kernel32.dll, or various fancy glibc, Linux or BSD extensions.
68+
* library kernel32.dll, or various fancy glibc, linux or BSD extensions.
6969
*
7070
* In addition to the per-platform 'extra' modules, we define a module of
7171
* 'common BSD' libc routines that never quite made it into POSIX but show up
@@ -4542,7 +4542,7 @@ pub mod funcs {
45424542
pub fn glob(pattern: *const c_char,
45434543
flags: c_int,
45444544
errfunc: ::Nullable<extern "C" fn(epath: *const c_char,
4545-
errno: c_int) -> c_int>,
4545+
errno: c_int) -> int>,
45464546
pglob: *mut glob_t);
45474547
pub fn globfree(pglob: *mut glob_t);
45484548
}

trunk/src/libnative/io/file_unix.rs

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ impl rtio::RtioFileStream for FileDesc {
154154

155155
fn fstat(&mut self) -> IoResult<rtio::FileStat> {
156156
let mut stat: libc::stat = unsafe { mem::zeroed() };
157-
match unsafe { libc::fstat(self.fd(), &mut stat) } {
157+
match retry(|| unsafe { libc::fstat(self.fd(), &mut stat) }) {
158158
0 => Ok(mkstat(&stat)),
159159
_ => Err(super::last_error()),
160160
}
@@ -346,7 +346,9 @@ pub fn open(path: &CString, fm: rtio::FileMode, fa: rtio::FileAccess)
346346
}
347347

348348
pub fn mkdir(p: &CString, mode: uint) -> IoResult<()> {
349-
super::mkerr_libc(unsafe { libc::mkdir(p.as_ptr(), mode as libc::mode_t) })
349+
super::mkerr_libc(retry(|| unsafe {
350+
libc::mkdir(p.as_ptr(), mode as libc::mode_t)
351+
}))
350352
}
351353

352354
pub fn readdir(p: &CString) -> IoResult<Vec<CString>> {
@@ -391,11 +393,13 @@ pub fn readdir(p: &CString) -> IoResult<Vec<CString>> {
391393
}
392394

393395
pub fn unlink(p: &CString) -> IoResult<()> {
394-
super::mkerr_libc(unsafe { libc::unlink(p.as_ptr()) })
396+
super::mkerr_libc(retry(|| unsafe { libc::unlink(p.as_ptr()) }))
395397
}
396398

397399
pub fn rename(old: &CString, new: &CString) -> IoResult<()> {
398-
super::mkerr_libc(unsafe { libc::rename(old.as_ptr(), new.as_ptr()) })
400+
super::mkerr_libc(retry(|| unsafe {
401+
libc::rename(old.as_ptr(), new.as_ptr())
402+
}))
399403
}
400404

401405
pub fn chmod(p: &CString, mode: uint) -> IoResult<()> {
@@ -405,7 +409,9 @@ pub fn chmod(p: &CString, mode: uint) -> IoResult<()> {
405409
}
406410

407411
pub fn rmdir(p: &CString) -> IoResult<()> {
408-
super::mkerr_libc(unsafe { libc::rmdir(p.as_ptr()) })
412+
super::mkerr_libc(retry(|| unsafe {
413+
libc::rmdir(p.as_ptr())
414+
}))
409415
}
410416

411417
pub fn chown(p: &CString, uid: int, gid: int) -> IoResult<()> {
@@ -422,10 +428,10 @@ pub fn readlink(p: &CString) -> IoResult<CString> {
422428
len = 1024; // FIXME: read PATH_MAX from C ffi?
423429
}
424430
let mut buf: Vec<u8> = Vec::with_capacity(len as uint);
425-
match unsafe {
431+
match retry(|| unsafe {
426432
libc::readlink(p, buf.as_ptr() as *mut libc::c_char,
427433
len as libc::size_t) as libc::c_int
428-
} {
434+
}) {
429435
-1 => Err(super::last_error()),
430436
n => {
431437
assert!(n > 0);
@@ -436,11 +442,15 @@ pub fn readlink(p: &CString) -> IoResult<CString> {
436442
}
437443

438444
pub fn symlink(src: &CString, dst: &CString) -> IoResult<()> {
439-
super::mkerr_libc(unsafe { libc::symlink(src.as_ptr(), dst.as_ptr()) })
445+
super::mkerr_libc(retry(|| unsafe {
446+
libc::symlink(src.as_ptr(), dst.as_ptr())
447+
}))
440448
}
441449

442450
pub fn link(src: &CString, dst: &CString) -> IoResult<()> {
443-
super::mkerr_libc(unsafe { libc::link(src.as_ptr(), dst.as_ptr()) })
451+
super::mkerr_libc(retry(|| unsafe {
452+
libc::link(src.as_ptr(), dst.as_ptr())
453+
}))
444454
}
445455

446456
fn mkstat(stat: &libc::stat) -> rtio::FileStat {
@@ -479,15 +489,15 @@ fn mkstat(stat: &libc::stat) -> rtio::FileStat {
479489

480490
pub fn stat(p: &CString) -> IoResult<rtio::FileStat> {
481491
let mut stat: libc::stat = unsafe { mem::zeroed() };
482-
match unsafe { libc::stat(p.as_ptr(), &mut stat) } {
492+
match retry(|| unsafe { libc::stat(p.as_ptr(), &mut stat) }) {
483493
0 => Ok(mkstat(&stat)),
484494
_ => Err(super::last_error()),
485495
}
486496
}
487497

488498
pub fn lstat(p: &CString) -> IoResult<rtio::FileStat> {
489499
let mut stat: libc::stat = unsafe { mem::zeroed() };
490-
match unsafe { libc::lstat(p.as_ptr(), &mut stat) } {
500+
match retry(|| unsafe { libc::lstat(p.as_ptr(), &mut stat) }) {
491501
0 => Ok(mkstat(&stat)),
492502
_ => Err(super::last_error()),
493503
}
@@ -498,7 +508,9 @@ pub fn utime(p: &CString, atime: u64, mtime: u64) -> IoResult<()> {
498508
actime: (atime / 1000) as libc::time_t,
499509
modtime: (mtime / 1000) as libc::time_t,
500510
};
501-
super::mkerr_libc(unsafe { libc::utime(p.as_ptr(), &buf) })
511+
super::mkerr_libc(retry(|| unsafe {
512+
libc::utime(p.as_ptr(), &buf)
513+
}))
502514
}
503515

504516
#[cfg(test)]

0 commit comments

Comments
 (0)