Skip to content

Commit f199c72

Browse files
committed
---
yaml --- r: 151326 b: refs/heads/try2 c: 0fb1f3f h: refs/heads/master v: v3
1 parent ebef09f commit f199c72

File tree

29 files changed

+214
-1373
lines changed

29 files changed

+214
-1373
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: acf9d421467f6279ad3839f2e99a950b84eb2b17
8+
refs/heads/try2: 0fb1f3fd38e814e85b81ca412cdf508a038ead27
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.7 or `clang++` 3.x
23+
* `g++` 4.4 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/mk/crates.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
TARGET_CRATES := libc std green rustuv native flate arena glob term semver \
5353
uuid serialize sync getopts collections num test time rand \
54-
workcache url log regex graphviz
54+
workcache url log regex
5555
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros
5656
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5757
TOOLS := compiletest rustdoc rustc
@@ -67,7 +67,6 @@ DEPS_rustdoc := rustc native:sundown serialize sync getopts collections \
6767
test time
6868
DEPS_flate := std native:miniz
6969
DEPS_arena := std collections
70-
DEPS_graphviz := std
7170
DEPS_glob := std
7271
DEPS_serialize := std collections log
7372
DEPS_term := std collections

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,10 @@ closure in the new task.
8989
fn print_message() { println!("I am running in a different task!"); }
9090
spawn(print_message);
9191
92-
// Print something more profound in a different task using a lambda expression
93-
// This uses the proc() keyword to assign to spawn a function with no name
94-
// That function will call println!(...) as requested
92+
// Print something profound in a different task using a `proc` expression
93+
// The `proc` expression evaluates to an (unnamed) owned closure.
94+
// That closure will call `println!(...)` when the spawned task runs.
95+
9596
spawn(proc() println!("I am also running in a different task!") );
9697
~~~~
9798

branches/try2/src/doc/tutorial.md

Lines changed: 16 additions & 20 deletions
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.7 or clang++ 3.x
93+
* g++ 4.4 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
@@ -468,16 +468,19 @@ Unlike in C, there is no "falling through" between arms: only one arm
468468
executes, and it doesn't have to explicitly `break` out of the
469469
construct when it is finished.
470470

471-
A `match` arm consists of a *pattern*, then a fat arrow `=>`, followed
472-
by an *action* (expression). Each case is separated by commas. It is
473-
often convenient to use a block expression for each case, in which case
474-
the commas are optional as shown below. Literals are valid patterns and
475-
match only their own value. A single arm may match multiple different
476-
patterns by combining them with the pipe operator (`|`), so long as every
477-
pattern binds the same set of variables. Ranges of numeric literal
478-
patterns can be expressed with two dots, as in `M..N`. The underscore
479-
(`_`) is a wildcard pattern that matches any single value. (`..`) is a
480-
different wildcard that can match one or more fields in an `enum` variant.
471+
A `match` arm consists of a *pattern*, then an arrow `=>`, followed by
472+
an *action* (expression). Literals are valid patterns and match only
473+
their own value. A single arm may match multiple different patterns by
474+
combining them with the pipe operator (`|`), so long as every pattern
475+
binds the same set of variables. Ranges of numeric literal patterns
476+
can be expressed with two dots, as in `M..N`. The underscore (`_`) is
477+
a wildcard pattern that matches any single value. (`..`) is a different
478+
wildcard that can match one or more fields in an `enum` variant.
479+
480+
The patterns in a match arm are followed by a fat arrow, `=>`, then an
481+
expression to evaluate. Each case is separated by commas. It's often
482+
convenient to use a block expression for each case, in which case the
483+
commas are optional.
481484

482485
~~~
483486
# let my_number = 1;
@@ -1413,7 +1416,7 @@ contains a point, but allocated in a different location:
14131416
14141417
~~~
14151418
# struct Point { x: f64, y: f64 }
1416-
let on_the_stack : Point = Point { x: 3.0, y: 4.0 };
1419+
let on_the_stack : Point = Point { x: 3.0, y: 4.0 };
14171420
let owned_box : ~Point = ~Point { x: 7.0, y: 9.0 };
14181421
~~~
14191422
@@ -2584,18 +2587,11 @@ for `Eq` and can be used with the equality operators, and that a value
25842587
of type `ABC` can be randomly generated and converted to a string:
25852588

25862589
~~~
2587-
extern crate rand;
2588-
25892590
#[deriving(Eq)]
25902591
struct Circle { radius: f64 }
25912592
2592-
#[deriving(Rand, Show)]
2593+
#[deriving(Clone, Show)]
25932594
enum ABC { A, B, C }
2594-
2595-
fn main() {
2596-
// Use the Show trait to print "A, B, C."
2597-
println!("{}, {}, {}", A, B, C);
2598-
}
25992595
~~~
26002596

26012597
The full list of derivable traits is `Eq`, `TotalEq`, `Ord`,

branches/try2/src/libarena/lib.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
extern crate collections;
2828

29-
use std::cast::{transmute, transmute_mut_lifetime};
29+
use std::cast::{transmute, transmute_mut, transmute_mut_lifetime};
3030
use std::cast;
3131
use std::cell::{Cell, RefCell};
3232
use std::mem;
@@ -281,8 +281,8 @@ impl Arena {
281281
#[inline]
282282
pub fn alloc<'a, T>(&'a self, op: || -> T) -> &'a T {
283283
unsafe {
284-
// FIXME #13933: Remove/justify all `&T` to `&mut T` transmutes
285-
let this: &mut Arena = transmute::<&_, &mut _>(self);
284+
// FIXME: Borrow check
285+
let this = transmute_mut(self);
286286
if intrinsics::needs_drop::<T>() {
287287
this.alloc_noncopy(op)
288288
} else {
@@ -438,8 +438,7 @@ impl<T> TypedArena<T> {
438438
#[inline]
439439
pub fn alloc<'a>(&'a self, object: T) -> &'a T {
440440
unsafe {
441-
// FIXME #13933: Remove/justify all `&T` to `&mut T` transmutes
442-
let this: &mut TypedArena<T> = cast::transmute::<&_, &mut _>(self);
441+
let this = cast::transmute_mut(self);
443442
if this.ptr == this.end {
444443
this.grow()
445444
}

0 commit comments

Comments
 (0)