Skip to content

Commit 8cf2728

Browse files
committed
---
yaml --- r: 151302 b: refs/heads/try2 c: 72f478f h: refs/heads/master v: v3
1 parent d171934 commit 8cf2728

File tree

16 files changed

+34
-51
lines changed

16 files changed

+34
-51
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: dcde1ee16344c8587502c38bdb5b8f7f11c6fb5a
8+
refs/heads/try2: 72f478f0e8262903d5c5c439a648d1b0e40e3ddb
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ documentation.
2020
## Building from Source
2121

2222
1. Make sure you have installed the dependencies:
23-
* `g++` 4.4 or `clang++` 3.x
23+
* `g++` 4.7 or `clang++` 3.x
2424
* `python` 2.6 or later (but not 3.x)
2525
* `perl` 5.0 or later
2626
* GNU `make` 3.81 or later

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,13 @@ 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.
5155
* [`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,
5258
* [`sync::Semaphore`] - A counting, blocking, bounded-waiting semaphore,
5359
* [`sync::Mutex`] - A blocking, bounded-waiting, mutual exclusion lock with an associated
5460
FIFO condition variable,
@@ -64,8 +70,13 @@ concurrency at this writing:
6470
[`std::task`]: std/task/index.html
6571
[`std::comm`]: std/comm/index.html
6672
[`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
6776
[`sync::Arc`]: sync/struct.Arc.html
68-
[`sync::Semaphore`]: sync/raw/struct.Semaphore.html
77+
[`sync::RWArc`]: sync/struct.RWArc.html
78+
[`sync::MutexArc`]: sync/struct.MutexArc.html
79+
[`sync::Semaphore`]: sync/struct.Semaphore.html
6980
[`sync::Mutex`]: sync/struct.Mutex.html
7081
[`sync::RWLock`]: sync/struct.RWLock.html
7182
[`sync::Barrier`]: sync/struct.Barrier.html

branches/try2/src/doc/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ supported build environments that are most likely to work.
9090
To build from source you will also need the following prerequisite
9191
packages:
9292

93-
* g++ 4.4 or clang++ 3.x
93+
* g++ 4.7 or clang++ 3.x
9494
* python 2.6 or later (but not 3.x)
9595
* perl 5.0 or later
9696
* gnu make 3.81 or later

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::OPEN_ALWAYS,
277+
(io::Open, _) => libc::CREATE_NEW,
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 > min && v <= max,
792-
ast::BiLe => v >= min && v < max,
793-
ast::BiGt => v >= min && v < max,
794-
ast::BiGe => v > min && v <= max,
791+
ast::BiLt => v <= max,
792+
ast::BiLe => v < max,
793+
ast::BiGt => v >= min,
794+
ast::BiGe => v > min,
795795
ast::BiEq | ast::BiNe => v >= min && v <= max,
796796
_ => fail!()
797797
}

branches/try2/src/libstd/intrinsics.rs

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

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

100101
fn visit_char(&mut self) -> bool;
@@ -340,18 +341,21 @@ extern "rust-intrinsic" {
340341
/// `min_align_of::<T>()`
341342
///
342343
/// The volatile parameter parameter is set to `true`, so it will not be optimized out.
344+
#[cfg(not(stage0))]
343345
pub fn volatile_copy_nonoverlapping_memory<T>(dst: *mut T, src: *T, count: uint);
344346
/// Equivalent to the appropriate `llvm.memmove.p0i8.0i8.*` intrinsic, with
345347
/// a size of `count` * `size_of::<T>()` and an alignment of
346348
/// `min_align_of::<T>()`
347349
///
348350
/// The volatile parameter parameter is set to `true`, so it will not be optimized out.
351+
#[cfg(not(stage0))]
349352
pub fn volatile_copy_memory<T>(dst: *mut T, src: *T, count: uint);
350353
/// Equivalent to the appropriate `llvm.memset.p0i8.*` intrinsic, with a
351354
/// size of `count` * `size_of::<T>()` and an alignment of
352355
/// `min_align_of::<T>()`.
353356
///
354357
/// The volatile parameter parameter is set to `true`, so it will not be optimized out.
358+
#[cfg(not(stage0))]
355359
pub fn volatile_set_memory<T>(dst: *mut T, val: u8, count: uint);
356360

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

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

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1255,31 +1255,11 @@ 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());
12631258
check!(File::open_mode(&tmpdir.join("b"), io::Open, io::Write));
1264-
12651259
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());
12711260
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());
12751261
check!(File::open_mode(&tmpdir.join("e"), io::Append, io::ReadWrite));
1276-
12771262
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());
12831263
check!(File::open_mode(&tmpdir.join("g"), io::Truncate, io::ReadWrite));
12841264

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

branches/try2/src/libstd/reflect.rs

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

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

branches/try2/src/libstd/repr.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ 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))]
283284
fn visit_f128(&mut self) -> bool { fail!("not implemented") }
284285

285286
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 self.args.len() <= arg {
271+
if arg < 0 || 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: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,9 @@ 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 == 1 {
223+
if b < 0 {
224+
return Err("error: expected more bools but hit EOF".to_owned());
225+
} else if b == 1 {
224226
bools_map.insert(bnames[i as uint].to_owned(), true);
225227
}
226228
}

branches/try2/src/snapshots.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
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-
91
S 2014-04-23 b5dd3f0
102
freebsd-x86_64 b6ccb045b9bea4cc4781bc128e047a1c68dc2c17
113
linux-i386 9e4e8d2bc70ff5b8db21169f762cb20c4dba6c2c

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
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))]
1113
#[deriving(Share(Bad),Send,Copy)]
1214
//~^ ERROR unexpected value in deriving, expected a trait
1315
struct Test;

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,6 @@ 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-
4432
fn qux() {
4533
let mut i = 1i8;
4634
while 200 != i { //~ ERROR comparison is useless due to type limits

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
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))]
1113
#[deriving(Share,Send,Copy)]
1214
struct Test;
1315

0 commit comments

Comments
 (0)