Skip to content

Commit dbc4548

Browse files
committed
---
yaml --- r: 148691 b: refs/heads/try2 c: e3b1f3c h: refs/heads/master i: 148689: 7915c9f 148687: 7627a63 v: v3
1 parent 9967b9c commit dbc4548

File tree

295 files changed

+2267
-2233
lines changed

Some content is hidden

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

295 files changed

+2267
-2233
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: 8cd935f52a9af8620f608e1baad94282f038a864
8+
refs/heads/try2: e3b1f3c443c048913e2d573fcc5a9c2be3484a78
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,15 @@ src/.DS_Store
7474
/doc/html
7575
/doc/latex
7676
/doc/std
77+
/doc/arena
7778
/doc/extra
79+
/doc/flate
80+
/doc/glob
7881
/doc/green
7982
/doc/native
8083
/doc/rustc
8184
/doc/syntax
85+
/doc/rustdoc
8286
/doc/rustuv
8387
/doc/rustpkg
8488
/nd/

branches/try2/AUTHORS.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ Vincent Belliard <[email protected]>
351351
Vivek Galatage <[email protected]>
352352
Volker Mische <[email protected]>
353353
Wade Mealing <[email protected]>
354-
William Ting <william.h.ting@gmail.com>
354+
William Ting <io@williamting.com>
355355
Yasuhiro Fujii <[email protected]>
356356
Young-il Choi <[email protected]>
357357
Youngmin Yoo <[email protected]>

branches/try2/Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ endif
124124
ifdef TRACE
125125
CFG_RUSTC_FLAGS += -Z trace
126126
endif
127-
ifdef DISABLE_RPATH
127+
ifdef CFG_DISABLE_RPATH
128128
# NOTE: make this CFG_RUSTC_FLAGS after stage0 snapshot
129129
RUSTFLAGS_STAGE1 += --no-rpath
130130
RUSTFLAGS_STAGE2 += --no-rpath

branches/try2/doc/complement-cheatsheet.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ let y: i64 = x.unwrap();
4848

4949
Use [`File::open`](http://static.rust-lang.org/doc/master/std/io/fs/struct.File.html#method.open) to create a [`File`](http://static.rust-lang.org/doc/master/std/io/fs/struct.File.html) struct, which implements the [`Reader`](http://static.rust-lang.org/doc/master/std/io/trait.Reader.html) trait.
5050

51-
~~~ {.xfail-test}
51+
~~~ {.ignore}
5252
use std::path::Path;
5353
use std::io::fs::File;
5454
@@ -168,7 +168,7 @@ let _ = close(Door::<Open>(~"front"));
168168

169169
Attempting to close a closed door is prevented statically:
170170

171-
~~~ {.xfail-test}
171+
~~~ {.ignore}
172172
let _ = close(Door::<Closed>(~"front")); // error: mismatched types: expected `main::Door<main::Open>` but found `main::Door<main::Closed>`
173173
~~~
174174

@@ -196,7 +196,7 @@ Window* createWindow(int width, int height);
196196

197197
You can use a zero-element `enum` ([phantom type](#how-do-i-express-phantom-types)) to represent the opaque object handle. The FFI would look like this:
198198

199-
~~~ {.xfail-test}
199+
~~~ {.ignore}
200200
enum Window {}
201201
extern "C" {
202202
fn createWindow(width: c_int, height: c_int) -> *Window;

branches/try2/doc/guide-conditions.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ An example program that does this task reads like this:
4545

4646
~~~~
4747
# #[allow(unused_imports)];
48-
# extern mod extra;
4948
use std::io::{BufferedReader, File};
5049
# mod BufferedReader {
5150
# use std::io::File;
@@ -243,7 +242,6 @@ and trapping its exit status using `task::try`:
243242

244243
~~~~
245244
# #[allow(unused_imports)];
246-
# extern mod extra;
247245
use std::io::{BufferedReader, File};
248246
use std::task;
249247
# mod BufferedReader {
@@ -263,15 +261,15 @@ use std::task;
263261
fn main() {
264262
265263
// Isolate failure within a subtask.
266-
let result = do task::try {
264+
let result = task::try(proc() {
267265
268266
// The protected logic.
269267
let pairs = read_int_pairs();
270268
for &(a,b) in pairs.iter() {
271269
println!("{:4.4d}, {:4.4d}", a, b);
272270
}
273271
274-
};
272+
});
275273
if result.is_err() {
276274
println!("parsing failed");
277275
}
@@ -347,7 +345,6 @@ but similarly clear as the version that used `fail!` in the logic where the erro
347345

348346
~~~~
349347
# #[allow(unused_imports)];
350-
# extern mod extra;
351348
use std::io::{BufferedReader, File};
352349
# mod BufferedReader {
353350
# use std::io::File;
@@ -416,7 +413,6 @@ and replaces bad input lines with the pair `(-1,-1)`:
416413

417414
~~~~
418415
# #[allow(unused_imports)];
419-
# extern mod extra;
420416
use std::io::{BufferedReader, File};
421417
# mod BufferedReader {
422418
# use std::io::File;
@@ -491,7 +487,6 @@ Changing the condition's return type from `(int,int)` to `Option<(int,int)>` wil
491487

492488
~~~~
493489
# #[allow(unused_imports)];
494-
# extern mod extra;
495490
use std::io::{BufferedReader, File};
496491
# mod BufferedReader {
497492
# use std::io::File;
@@ -576,8 +571,7 @@ This can be encoded in the handler API by introducing a helper type: `enum Malfo
576571

577572
~~~~
578573
# #[allow(unused_imports)];
579-
# extern mod extra;
580-
use std::io::File;
574+
use std::io::{BufferedReader, File};
581575
# mod BufferedReader {
582576
# use std::io::File;
583577
# use std::io::MemReader;
@@ -700,7 +694,6 @@ a second condition and a helper function will suffice:
700694

701695
~~~~
702696
# #[allow(unused_imports)];
703-
# extern mod extra;
704697
use std::io::{BufferedReader, File};
705698
# mod BufferedReader {
706699
# use std::io::File;

branches/try2/doc/guide-container.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ Containers can provide conversion from iterators through `collect` by
270270
implementing the `FromIterator` trait. For example, the implementation for
271271
vectors is as follows:
272272
273-
~~~ {.xfail-test}
273+
~~~ {.ignore}
274274
impl<A> FromIterator<A> for ~[A] {
275275
pub fn from_iterator<T: Iterator<A>>(iterator: &mut T) -> ~[A] {
276276
let (lower, _) = iterator.size_hint();
@@ -288,7 +288,7 @@ impl<A> FromIterator<A> for ~[A] {
288288
The `Iterator` trait provides a `size_hint` default method, returning a lower
289289
bound and optionally on upper bound on the length of the iterator:
290290

291-
~~~ {.xfail-test}
291+
~~~ {.ignore}
292292
fn size_hint(&self) -> (uint, Option<uint>) { (0, None) }
293293
~~~
294294

branches/try2/doc/guide-ffi.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ snappy includes a C interface (documented in
1111
The following is a minimal example of calling a foreign function which will
1212
compile if snappy is installed:
1313

14-
~~~~ {.xfail-test}
14+
~~~~ {.ignore}
1515
use std::libc::size_t;
1616
1717
#[link(name = "snappy")]
@@ -43,7 +43,7 @@ keeping the binding correct at runtime.
4343

4444
The `extern` block can be extended to cover the entire snappy API:
4545

46-
~~~~ {.xfail-test}
46+
~~~~ {.ignore}
4747
use std::libc::{c_int, size_t};
4848
4949
#[link(name = "snappy")]
@@ -76,7 +76,7 @@ vectors as pointers to memory. Rust's vectors are guaranteed to be a contiguous
7676
length is number of elements currently contained, and the capacity is the total size in elements of
7777
the allocated memory. The length is less than or equal to the capacity.
7878

79-
~~~~ {.xfail-test}
79+
~~~~ {.ignore}
8080
pub fn validate_compressed_buffer(src: &[u8]) -> bool {
8181
unsafe {
8282
snappy_validate_compressed_buffer(src.as_ptr(), src.len() as size_t) == 0
@@ -96,7 +96,7 @@ required capacity to hold the compressed output. The vector can then be passed t
9696
`snappy_compress` function as an output parameter. An output parameter is also passed to retrieve
9797
the true length after compression for setting the length.
9898

99-
~~~~ {.xfail-test}
99+
~~~~ {.ignore}
100100
pub fn compress(src: &[u8]) -> ~[u8] {
101101
unsafe {
102102
let srclen = src.len() as size_t;
@@ -116,7 +116,7 @@ pub fn compress(src: &[u8]) -> ~[u8] {
116116
Decompression is similar, because snappy stores the uncompressed size as part of the compression
117117
format and `snappy_uncompressed_length` will retrieve the exact buffer size required.
118118

119-
~~~~ {.xfail-test}
119+
~~~~ {.ignore}
120120
pub fn uncompress(src: &[u8]) -> Option<~[u8]> {
121121
unsafe {
122122
let srclen = src.len() as size_t;
@@ -263,7 +263,7 @@ to the C library and afterwards be invoked from there.
263263
A basic example is:
264264

265265
Rust code:
266-
~~~~ {.xfail-test}
266+
~~~~ {.ignore}
267267
extern fn callback(a:i32) {
268268
println!("I'm called from C with value {0}", a);
269269
}
@@ -283,7 +283,7 @@ fn main() {
283283
~~~~
284284

285285
C code:
286-
~~~~ {.xfail-test}
286+
~~~~ {.ignore}
287287
typedef void (*rust_callback)(int32_t);
288288
rust_callback cb;
289289
@@ -314,7 +314,7 @@ the notification. This will allow the callback to unsafely access the
314314
referenced Rust object.
315315

316316
Rust code:
317-
~~~~ {.xfail-test}
317+
~~~~ {.ignore}
318318
319319
struct RustObject {
320320
a: i32,
@@ -346,7 +346,7 @@ fn main() {
346346
~~~~
347347

348348
C code:
349-
~~~~ {.xfail-test}
349+
~~~~ {.ignore}
350350
typedef void (*rust_callback)(int32_t);
351351
void* cb_target;
352352
rust_callback cb;
@@ -440,7 +440,7 @@ the `link_args` attribute. This attribute is applied to `extern` blocks and
440440
specifies raw flags which need to get passed to the linker when producing an
441441
artifact. An example usage would be:
442442

443-
~~~ {.xfail-test}
443+
~~~ {.ignore}
444444
#[link_args = "-foo -bar -baz"]
445445
extern {}
446446
~~~
@@ -476,7 +476,7 @@ Foreign APIs often export a global variable which could do something like track
476476
global state. In order to access these variables, you declare them in `extern`
477477
blocks with the `static` keyword:
478478

479-
~~~{.xfail-test}
479+
~~~{.ignore}
480480
use std::libc;
481481
482482
#[link(name = "readline")]
@@ -494,7 +494,7 @@ Alternatively, you may need to alter global state provided by a foreign
494494
interface. To do this, statics can be declared with `mut` so rust can mutate
495495
them.
496496

497-
~~~{.xfail-test}
497+
~~~{.ignore}
498498
use std::libc;
499499
use std::ptr;
500500

branches/try2/doc/guide-lifetimes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ _as soon as its owning reference changes or goes out of
299299
scope_. Therefore, a program like this is illegal (and would be
300300
rejected by the compiler):
301301

302-
~~~ {.xfail-test}
302+
~~~ {.ignore}
303303
fn example3() -> int {
304304
let mut x = ~X {f: 3};
305305
let y = &x.f;
@@ -346,7 +346,7 @@ modify the previous example to introduce additional owned pointers
346346
and structs, and the compiler will still be able to detect possible
347347
mutations:
348348

349-
~~~ {.xfail-test}
349+
~~~ {.ignore}
350350
fn example3() -> int {
351351
struct R { g: int }
352352
struct S { f: ~R }
@@ -524,7 +524,7 @@ the compiler accepts the function `get_x()`.
524524
To emphasize this point, let’s look at a variation on the example, this
525525
time one that does not compile:
526526

527-
~~~ {.xfail-test}
527+
~~~ {.ignore}
528528
struct Point {x: f64, y: f64}
529529
fn get_x_sh(p: @Point) -> &f64 {
530530
&p.x // Error reported here

branches/try2/doc/guide-pointers.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ fn succ(x: &int) -> int { *x + 1 }
2121

2222
So I wrote this code to try it out:
2323

24-
~~~rust{.xfail-test}
24+
~~~rust{.ignore}
2525
fn main() {
2626
let number = 5;
2727
let succ_number = succ(number);
@@ -221,9 +221,9 @@ struct Point {
221221

222222
fn main() {
223223
let a = Point { x: 10, y: 20 };
224-
do spawn {
224+
spawn(proc() {
225225
println!("{}", a.x);
226-
}
226+
});
227227
}
228228
~~~
229229

@@ -238,9 +238,9 @@ struct Point {
238238

239239
fn main() {
240240
let a = ~Point { x: 10, y: 20 };
241-
do spawn {
241+
spawn(proc() {
242242
println!("{}", a.x);
243-
}
243+
});
244244
}
245245
~~~
246246

@@ -261,7 +261,7 @@ program is very large and complicated.
261261

262262
For example, let's say you're using an owned pointer, and you want to do this:
263263

264-
~~~rust{.xfail-test}
264+
~~~rust{.ignore}
265265
struct Point {
266266
x: int,
267267
y: int,
@@ -369,7 +369,7 @@ This theory is called 'region pointers,' and involve a concept called
369369
'lifetimes'. Here's the simple explanation: would you expect this code to
370370
compile?
371371

372-
~~~rust{.xfail-test}
372+
~~~rust{.ignore}
373373
fn main() {
374374
println!("{}", x);
375375
let x = 5;
@@ -398,7 +398,7 @@ Here, we're borrowing a pointer to `x` inside of the `if`. The compiler, however
398398
is able to determine that that pointer will go out of scope without `x` being
399399
mutated, and therefore, lets us pass. This wouldn't work:
400400

401-
~~~rust{.xfail-test}
401+
~~~rust{.ignore}
402402
fn main() {
403403
let mut x = ~5;
404404
if *x < 10 {

branches/try2/doc/guide-runtime.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ implemented in user-space.
176176
The primary concern of an M:N runtime is that a Rust task cannot block itself in
177177
a syscall. If this happens, then the entire OS thread is frozen and unavailable
178178
for running more Rust tasks, making this a (M-1):N runtime (and you can see how
179-
this can reach 0/deadlock. By using asynchronous I/O under the hood (all I/O
179+
this can reach 0/deadlock). By using asynchronous I/O under the hood (all I/O
180180
still looks synchronous in terms of code), OS threads are never blocked until
181181
the appropriate time comes.
182182

@@ -236,9 +236,9 @@ extern mod green;
236236
237237
#[start]
238238
fn start(argc: int, argv: **u8) -> int {
239-
do green::start(argc, argv) {
239+
green::start(argc, argv, proc() {
240240
main();
241-
}
241+
})
242242
}
243243
244244
fn main() {}

0 commit comments

Comments
 (0)