Skip to content

Commit 76456fb

Browse files
committed
---
yaml --- r: 148086 b: refs/heads/try2 c: 4329fc6 h: refs/heads/master v: v3
1 parent 62abcfb commit 76456fb

File tree

42 files changed

+1018
-526
lines changed

Some content is hidden

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

42 files changed

+1018
-526
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: 116773a4eb63c6e595d35d228513cddb1adf4053
8+
refs/heads/try2: 4329fc6730e381b3b06f9987327072c50a739ad4
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/doc/guide-macros.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ return result + val;
278278
This solves the indentation problem. But if we have a lot of chained matches
279279
like this, we might prefer to write a single macro invocation. The input
280280
pattern we want is clear:
281+
281282
~~~~
282283
# macro_rules! b(
283284
( $( ($e:expr) ~ ($p:pat) else $err:stmt ; )*
@@ -304,6 +305,7 @@ input patterns:
304305
( binds $( $bind_res:ident ),* )
305306
# => (0))
306307
~~~~
308+
307309
...and:
308310

309311
~~~~

branches/try2/doc/guide-tasks.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ With `extra::future`, rust has a mechanism for requesting a computation and gett
263263
later.
264264

265265
The basic example below illustrates this.
266+
266267
~~~
267268
# fn make_a_sandwich() {};
268269
fn fib(n: u64) -> u64 {
@@ -283,6 +284,7 @@ the future needs to be mutable so that it can save the result for next time `get
283284

284285
Here is another example showing how futures allow you to background computations. The workload will
285286
be distributed on the available cores.
287+
286288
~~~
287289
# use std::vec;
288290
fn partial_sum(start: uint) -> f64 {
@@ -317,6 +319,7 @@ acts as a reference to the shared data and only this reference is shared and clo
317319

318320
Here is a small example showing how to use Arcs. We wish to run concurrently several computations on
319321
a single large vector of floats. Each task needs the full vector to perform its duty.
322+
320323
~~~
321324
# use std::vec;
322325
# use std::rand;
@@ -348,14 +351,17 @@ fn main() {
348351
The function `pnorm` performs a simple computation on the vector (it computes the sum of its items
349352
at the power given as argument and takes the inverse power of this value). The Arc on the vector is
350353
created by the line
354+
351355
~~~
352356
# use extra::arc::Arc;
353357
# use std::vec;
354358
# use std::rand;
355359
# let numbers = vec::from_fn(1000000, |_| rand::random::<f64>());
356360
let numbers_arc=Arc::new(numbers);
357361
~~~
362+
358363
and a clone of it is sent to each task
364+
359365
~~~
360366
# use extra::arc::Arc;
361367
# use std::vec;
@@ -365,9 +371,11 @@ and a clone of it is sent to each task
365371
# let (port, chan) = Chan::new();
366372
chan.send(numbers_arc.clone());
367373
~~~
374+
368375
copying only the wrapper and not its contents.
369376

370377
Each task recovers the underlying data by
378+
371379
~~~
372380
# use extra::arc::Arc;
373381
# use std::vec;
@@ -379,6 +387,7 @@ Each task recovers the underlying data by
379387
# let local_arc : Arc<~[f64]> = port.recv();
380388
let task_numbers = local_arc.get();
381389
~~~
390+
382391
and can use it as if it were local.
383392

384393
The `arc` module also implements Arcs around mutable data that are not covered here.

branches/try2/doc/rust.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -845,6 +845,7 @@ If a sequence of such redirections form a cycle or cannot be resolved unambiguou
845845
they represent a compile-time error.
846846

847847
An example of re-exporting:
848+
848849
~~~~
849850
# fn main() { }
850851
mod quux {
@@ -868,6 +869,7 @@ All rules regarding accessing declared modules in `use` declarations applies to
868869
and `extern mod` declarations.
869870

870871
An example of what will and will not work for `use` items:
872+
871873
~~~~
872874
# #[allow(unused_imports)];
873875
use foo::extra; // good: foo is at the root of the crate
@@ -1184,6 +1186,7 @@ a = Cat;
11841186
~~~~
11851187

11861188
Enumeration constructors can have either named or unnamed fields:
1189+
11871190
~~~~
11881191
enum Animal {
11891192
Dog (~str, f64),

branches/try2/doc/tutorial.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2790,13 +2790,15 @@ For example, if we move the `animals` module above into its own file...
27902790
mod plants;
27912791
mod animals;
27922792
~~~
2793+
27932794
~~~ {.ignore}
27942795
// src/animals.rs or src/animals/mod.rs
27952796
mod fish;
27962797
mod mammals {
27972798
mod humans;
27982799
}
27992800
~~~
2801+
28002802
...then the source files of `mod animals`'s submodules can
28012803
either be placed right next to that of its parents, or in a subdirectory if `animals` source file is:
28022804

@@ -2959,6 +2961,7 @@ pub fn bar() { println("Baz!"); }
29592961
There also exist two short forms for importing multiple names at once:
29602962

29612963
1. Explicit mention multiple names as the last element of an `use` path:
2964+
29622965
~~~
29632966
use farm::{chicken, cow};
29642967
# mod farm {
@@ -2969,6 +2972,7 @@ use farm::{chicken, cow};
29692972
~~~
29702973

29712974
2. Import everything in a module with a wildcard:
2975+
29722976
~~~
29732977
use farm::*;
29742978
# mod farm {

branches/try2/src/compiletest/compiletest.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#[allow(non_camel_case_types)];
1414
#[deny(warnings)];
1515

16-
#[cfg(stage0)] extern mod green;
1716
extern mod extra;
1817

1918
use std::os;

branches/try2/src/driver/driver.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-
#[cfg(stage0)] extern mod green;
12-
1311
#[cfg(rustpkg)]
1412
extern mod this = "rustpkg";
1513

branches/try2/src/libextra/bitv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ impl SmallBitv {
8080
self.bits |= 1<<i;
8181
}
8282
else {
83-
self.bits &= !(1<<i as uint);
83+
self.bits &= !(1<<i);
8484
}
8585
}
8686

0 commit comments

Comments
 (0)