Skip to content

Commit 4815d78

Browse files
committed
---
yaml --- r: 151303 b: refs/heads/try2 c: 8895f25 h: refs/heads/master i: 151301: d171934 151299: e0d6f1e 151295: 66464db v: v3
1 parent 8cf2728 commit 4815d78

File tree

14 files changed

+49
-32
lines changed

14 files changed

+49
-32
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 72f478f0e8262903d5c5c439a648d1b0e40e3ddb
8+
refs/heads/try2: 8895f252417495b423796807ba180eb59da5a1c1
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/doc/guide-tasks.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,7 @@ concurrency at this writing:
4848
* [`std::task`] - All code relating to tasks and task scheduling,
4949
* [`std::comm`] - The message passing interface,
5050
* [`sync::DuplexStream`] - An extension of `pipes::stream` that allows both sending and receiving,
51-
* [`sync::SyncSender`] - An extension of `pipes::stream` that provides synchronous message sending,
52-
* [`sync::SyncReceiver`] - An extension of `pipes::stream` that acknowledges each message received,
53-
* [`sync::rendezvous`] - Creates a stream whose channel, upon sending a message, blocks until the
54-
message is received.
5551
* [`sync::Arc`] - The Arc (atomically reference counted) type, for safely sharing immutable data,
56-
* [`sync::RWArc`] - A dual-mode Arc protected by a reader-writer lock,
57-
* [`sync::MutexArc`] - An Arc with mutable data protected by a blocking mutex,
5852
* [`sync::Semaphore`] - A counting, blocking, bounded-waiting semaphore,
5953
* [`sync::Mutex`] - A blocking, bounded-waiting, mutual exclusion lock with an associated
6054
FIFO condition variable,
@@ -70,13 +64,8 @@ concurrency at this writing:
7064
[`std::task`]: std/task/index.html
7165
[`std::comm`]: std/comm/index.html
7266
[`sync::DuplexStream`]: sync/struct.DuplexStream.html
73-
[`sync::SyncSender`]: sync/struct.SyncSender.html
74-
[`sync::SyncReceiver`]: sync/struct.SyncReceiver.html
75-
[`sync::rendezvous`]: sync/fn.rendezvous.html
7667
[`sync::Arc`]: sync/struct.Arc.html
77-
[`sync::RWArc`]: sync/struct.RWArc.html
78-
[`sync::MutexArc`]: sync/struct.MutexArc.html
79-
[`sync::Semaphore`]: sync/struct.Semaphore.html
68+
[`sync::Semaphore`]: sync/raw/struct.Semaphore.html
8069
[`sync::Mutex`]: sync/struct.Mutex.html
8170
[`sync::RWLock`]: sync/struct.RWLock.html
8271
[`sync::Barrier`]: sync/struct.Barrier.html

branches/try2/src/libnative/io/file_win32.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ pub fn open(path: &CString, fm: io::FileMode, fa: io::FileAccess)
274274
(io::Truncate, io::Read) => libc::TRUNCATE_EXISTING,
275275
(io::Truncate, _) => libc::CREATE_ALWAYS,
276276
(io::Open, io::Read) => libc::OPEN_EXISTING,
277-
(io::Open, _) => libc::CREATE_NEW,
277+
(io::Open, _) => libc::OPEN_ALWAYS,
278278
(io::Append, io::Read) => {
279279
dwDesiredAccess |= libc::FILE_APPEND_DATA;
280280
libc::OPEN_EXISTING

branches/try2/src/librustc/middle/lint.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -788,10 +788,10 @@ fn check_type_limits(cx: &Context, e: &ast::Expr) {
788788
fn is_valid<T:cmp::Ord>(binop: ast::BinOp, v: T,
789789
min: T, max: T) -> bool {
790790
match binop {
791-
ast::BiLt => v <= max,
792-
ast::BiLe => v < max,
793-
ast::BiGt => v >= min,
794-
ast::BiGe => v > min,
791+
ast::BiLt => v > min && v <= max,
792+
ast::BiLe => v >= min && v < max,
793+
ast::BiGt => v >= min && v < max,
794+
ast::BiGe => v > min && v <= max,
795795
ast::BiEq | ast::BiNe => v >= min && v <= max,
796796
_ => fail!()
797797
}

branches/try2/src/libstd/intrinsics.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ pub trait TyVisitor {
9595

9696
fn visit_f32(&mut self) -> bool;
9797
fn visit_f64(&mut self) -> bool;
98-
#[cfg(not(stage0))]
9998
fn visit_f128(&mut self) -> bool;
10099

101100
fn visit_char(&mut self) -> bool;
@@ -341,21 +340,18 @@ extern "rust-intrinsic" {
341340
/// `min_align_of::<T>()`
342341
///
343342
/// The volatile parameter parameter is set to `true`, so it will not be optimized out.
344-
#[cfg(not(stage0))]
345343
pub fn volatile_copy_nonoverlapping_memory<T>(dst: *mut T, src: *T, count: uint);
346344
/// Equivalent to the appropriate `llvm.memmove.p0i8.0i8.*` intrinsic, with
347345
/// a size of `count` * `size_of::<T>()` and an alignment of
348346
/// `min_align_of::<T>()`
349347
///
350348
/// The volatile parameter parameter is set to `true`, so it will not be optimized out.
351-
#[cfg(not(stage0))]
352349
pub fn volatile_copy_memory<T>(dst: *mut T, src: *T, count: uint);
353350
/// Equivalent to the appropriate `llvm.memset.p0i8.*` intrinsic, with a
354351
/// size of `count` * `size_of::<T>()` and an alignment of
355352
/// `min_align_of::<T>()`.
356353
///
357354
/// The volatile parameter parameter is set to `true`, so it will not be optimized out.
358-
#[cfg(not(stage0))]
359355
pub fn volatile_set_memory<T>(dst: *mut T, val: u8, count: uint);
360356

361357
/// Perform a volatile load from the `src` pointer.

branches/try2/src/libstd/io/fs.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1255,11 +1255,31 @@ mod test {
12551255
match File::open_mode(&tmpdir.join("a"), io::Open, io::Read) {
12561256
Ok(..) => fail!(), Err(..) => {}
12571257
}
1258+
1259+
// Perform each one twice to make sure that it succeeds the second time
1260+
// (where the file exists)
1261+
check!(File::open_mode(&tmpdir.join("b"), io::Open, io::Write));
1262+
assert!(tmpdir.join("b").exists());
12581263
check!(File::open_mode(&tmpdir.join("b"), io::Open, io::Write));
1264+
12591265
check!(File::open_mode(&tmpdir.join("c"), io::Open, io::ReadWrite));
1266+
assert!(tmpdir.join("c").exists());
1267+
check!(File::open_mode(&tmpdir.join("c"), io::Open, io::ReadWrite));
1268+
1269+
check!(File::open_mode(&tmpdir.join("d"), io::Append, io::Write));
1270+
assert!(tmpdir.join("d").exists());
12601271
check!(File::open_mode(&tmpdir.join("d"), io::Append, io::Write));
1272+
1273+
check!(File::open_mode(&tmpdir.join("e"), io::Append, io::ReadWrite));
1274+
assert!(tmpdir.join("e").exists());
12611275
check!(File::open_mode(&tmpdir.join("e"), io::Append, io::ReadWrite));
1276+
12621277
check!(File::open_mode(&tmpdir.join("f"), io::Truncate, io::Write));
1278+
assert!(tmpdir.join("f").exists());
1279+
check!(File::open_mode(&tmpdir.join("f"), io::Truncate, io::Write));
1280+
1281+
check!(File::open_mode(&tmpdir.join("g"), io::Truncate, io::ReadWrite));
1282+
assert!(tmpdir.join("g").exists());
12631283
check!(File::open_mode(&tmpdir.join("g"), io::Truncate, io::ReadWrite));
12641284

12651285
check!(File::create(&tmpdir.join("h")).write("foo".as_bytes()));

branches/try2/src/libstd/reflect.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ impl<V:TyVisitor + MovePtr> TyVisitor for MovePtrAdaptor<V> {
176176
true
177177
}
178178

179-
#[cfg(not(stage0))]
180179
fn visit_f128(&mut self) -> bool {
181180
self.align_to::<f128>();
182181
if ! self.inner.visit_f128() { return false; }

branches/try2/src/libstd/repr.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,6 @@ impl<'a> TyVisitor for ReprVisitor<'a> {
280280

281281
fn visit_f32(&mut self) -> bool { self.write::<f32>() }
282282
fn visit_f64(&mut self) -> bool { self.write::<f64>() }
283-
#[cfg(not(stage0))]
284283
fn visit_f128(&mut self) -> bool { fail!("not implemented") }
285284

286285
fn visit_char(&mut self) -> bool {

branches/try2/src/libsyntax/ext/format.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ impl<'a, 'b> Context<'a, 'b> {
268268
fn verify_arg_type(&mut self, arg: Position, ty: ArgumentType) {
269269
match arg {
270270
Exact(arg) => {
271-
if arg < 0 || self.args.len() <= arg {
271+
if self.args.len() <= arg {
272272
let msg = format!("invalid reference to argument `{}` (there \
273273
are {} arguments)", arg, self.args.len());
274274
self.ecx.span_err(self.fmtsp, msg);

branches/try2/src/libterm/terminfo/parser/compiled.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,7 @@ pub fn parse(file: &mut io::Reader,
220220
if bools_bytes != 0 {
221221
for i in range(0, bools_bytes) {
222222
let b = try!(file.read_byte());
223-
if b < 0 {
224-
return Err("error: expected more bools but hit EOF".to_owned());
225-
} else if b == 1 {
223+
if b == 1 {
226224
bools_map.insert(bnames[i as uint].to_owned(), true);
227225
}
228226
}

branches/try2/src/snapshots.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
S 2014-05-04 922c420
2+
freebsd-x86_64 635f28dd48340db0c1cdc01adad18866acfc7020
3+
linux-i386 360a40acf713e6f2d7fcde0112ae87d8336f320c
4+
linux-x86_64 a6dfa69483824d525180ac6040b59beed7df165b
5+
macos-i386 75e466423e2183e57a5f02358c6f9210997eae94
6+
macos-x86_64 12575c620e163002f6d30d1843564eeae31de7b9
7+
winnt-i386 be45073b14691e2b0aa9181d4238cbc310f5ae58
8+
19
S 2014-04-23 b5dd3f0
210
freebsd-x86_64 b6ccb045b9bea4cc4781bc128e047a1c68dc2c17
311
linux-i386 9e4e8d2bc70ff5b8db21169f762cb20c4dba6c2c

branches/try2/src/test/compile-fail/deriving-bounds.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
//NOTE: Remove in the next snapshot
12-
#[cfg(not(stage0))]
1311
#[deriving(Share(Bad),Send,Copy)]
1412
//~^ ERROR unexpected value in deriving, expected a trait
1513
struct Test;

branches/try2/src/test/compile-fail/lint-type-limits.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,18 @@ fn baz() -> bool {
2929
//~^ WARNING literal out of range for its type
3030
}
3131

32+
fn bleh() {
33+
let u = 42u8;
34+
let _ = u > 255; //~ ERROR comparison is useless due to type limits
35+
let _ = 255 < u; //~ ERROR comparison is useless due to type limits
36+
let _ = u < 0; //~ ERROR comparison is useless due to type limits
37+
let _ = 0 > u; //~ ERROR comparison is useless due to type limits
38+
let _ = u <= 255; //~ ERROR comparison is useless due to type limits
39+
let _ = 255 >= u; //~ ERROR comparison is useless due to type limits
40+
let _ = u >= 0; //~ ERROR comparison is useless due to type limits
41+
let _ = 0 <= u; //~ ERROR comparison is useless due to type limits
42+
}
43+
3244
fn qux() {
3345
let mut i = 1i8;
3446
while 200 != i { //~ ERROR comparison is useless due to type limits

branches/try2/src/test/run-pass/deriving-bounds.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
//NOTE: Remove in the next snapshot
12-
#[cfg(not(stage0))]
1311
#[deriving(Share,Send,Copy)]
1412
struct Test;
1513

0 commit comments

Comments
 (0)