Skip to content

Commit 5a0f3fb

Browse files
committed
---
yaml --- r: 63087 b: refs/heads/snap-stage3 c: 54d914a h: refs/heads/master i: 63085: 002dce2 63083: 68dfaa2 63079: 74454e4 63071: 315fb59 v: v3
1 parent bba8aaf commit 5a0f3fb

File tree

967 files changed

+57679
-10496
lines changed

Some content is hidden

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

967 files changed

+57679
-10496
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: d83d38c7fe3408848664de66a9a53587f627a01b
4+
refs/heads/snap-stage3: 54d914a9a932a0e9e65195f0f5be91e5e8b7f342
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
src/rt/msvc/* -whitespace
88
src/rt/vg/* -whitespace
99
src/rt/linenoise/* -whitespace
10+
src/rt/jemalloc/**/* -whitespace

branches/snap-stage3/.mailmap

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#
2+
# This list is used by git-shortlog to aggregate contributions. It is
3+
# necessary when either the author's full name is not always written
4+
# the same way, and/or the same author contributes from different
5+
# email addresses.
6+
#
7+
8+
Elly Jones <[email protected]>
9+
10+
Junyoung Cho <[email protected]>
11+
Matthijs Hofstra <[email protected]>
12+
Rob Arnold <[email protected]>

branches/snap-stage3/CONTRIBUTING.md

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,42 @@
11
## Pull request procedure
22

3-
Pull requests should be targeted at Rust's `incoming` branch (note that by default Github will aim them at the `master` branch) --
4-
see "Changing The Commit Range and Destination Repository" in Github's documentation on [pull requests](https://help.github.com/articles/using-pull-requests).
5-
Before pushing to your Github repo and issuing the pull request, please do two things:
3+
Pull requests should be targeted at Rust's `incoming` branch (note
4+
that by default Github will aim them at the `master` branch) -- see
5+
"Changing The Commit Range and Destination Repository" in Github's
6+
documentation on [pull
7+
requests](https://help.github.com/articles/using-pull-requests).
8+
Before pushing to your Github repo and issuing the pull request,
9+
please do two things:
610

7-
1. [Rebase](http://git-scm.com/book/en/Git-Branching-Rebasing) your local changes against the `incoming` branch. Resolve any conflicts that arise.
8-
2. Run the full Rust test suite with the `make check` command.
9-
You're not off the hook even if you just stick to documentation; code examples in the docs are tested as well!
11+
1. [Rebase](http://git-scm.com/book/en/Git-Branching-Rebasing) your
12+
local changes against the `incoming` branch. Resolve any conflicts
13+
that arise.
1014

11-
Pull requests will be treated as "review requests",
12-
and we will give feedback we expect to see corrected on [style](https://github.com/mozilla/rust/wiki/Note-style-guide) and substance before pulling.
13-
Changes contributed via pull request should focus on a single issue at a time, like any other.
14-
We will not accept pull-requests that try to "sneak" unrelated changes in.
15+
2. Run the full Rust test suite with the `make check` command. You're
16+
not off the hook even if you just stick to documentation; code
17+
examples in the docs are tested as well!
1518

16-
Normally, all pull requests must include regression tests (see [Note-testsuite](https://github.com/mozilla/rust/wiki/Note-testsuite)) that test your change.
17-
Occasionally, a change will be very difficult to test for.
18-
In those cases, please include a note in your commit message explaining why.
19+
Pull requests will be treated as "review requests", and we will give
20+
feedback we expect to see corrected on
21+
[style](https://github.com/mozilla/rust/wiki/Note-style-guide) and
22+
substance before pulling. Changes contributed via pull request should
23+
focus on a single issue at a time, like any other. We will not accept
24+
pull-requests that try to "sneak" unrelated changes in.
1925

20-
In the licensing header at the beginning of any files you change, please make sure the listed date range includes the current year.
21-
For example, if it's 2013, and you change a Rust file that was created in 2010, it should begin:
26+
Normally, all pull requests must include regression tests (see
27+
[Note-testsuite](https://github.com/mozilla/rust/wiki/Note-testsuite))
28+
that test your change. Occasionally, a change will be very difficult
29+
to test for. In those cases, please include a note in your commit
30+
message explaining why.
31+
32+
In the licensing header at the beginning of any files you change,
33+
please make sure the listed date range includes the current year. For
34+
example, if it's 2013, and you change a Rust file that was created in
35+
2010, it should begin:
2236

2337
```
2438
// Copyright 2010-2013 The Rust Project Developers.
2539
```
2640

27-
For more details, please refer to [Note-development-policy](https://github.com/mozilla/rust/wiki/Note-development-policy).
41+
For more details, please refer to
42+
[Note-development-policy](https://github.com/mozilla/rust/wiki/Note-development-policy).

branches/snap-stage3/Makefile.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,7 @@ ifneq ($(wildcard $(CFG_GIT)),)
146146
ifneq ($(wildcard $(CFG_GIT_DIR)),)
147147
CFG_VERSION += $(shell git --git-dir=$(CFG_GIT_DIR) log -1 \
148148
--pretty=format:'(%h %ci)')
149-
CFG_VER_HASH = $(shell git --git-dir=$(CFG_GIT_DIR) log -1 \
150-
--pretty=format:'%H')
149+
CFG_VER_HASH = $(shell git --git-dir=$(CFG_GIT_DIR) rev-parse HEAD)
151150
endif
152151
endif
153152

branches/snap-stage3/configure

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ then
561561
| cut -d ' ' -f 2)
562562

563563
case $CFG_CLANG_VERSION in
564-
(3.0svn | 3.0 | 3.1* | 3.2* | 3.3*)
564+
(3.0svn | 3.0 | 3.1* | 3.2* | 3.3* | 3.4* )
565565
step_msg "found ok version of CLANG: $CFG_CLANG_VERSION"
566566
CFG_C_COMPILER="clang"
567567
;;
@@ -683,7 +683,8 @@ do
683683
for i in \
684684
isaac linenoise sync test \
685685
arch/i386 arch/x86_64 arch/arm arch/mips \
686-
libuv libuv/src/ares libuv/src/eio libuv/src/ev
686+
libuv libuv/src/ares libuv/src/eio libuv/src/ev \
687+
jemalloc
687688
do
688689
make_dir rt/$t/stage$s/$i
689690
done
@@ -970,6 +971,13 @@ then
970971
putvar CFG_CCACHE_CPP2
971972
fi
972973

974+
if [ ! -z "$CFG_ENABLE_CCACHE" ]
975+
then
976+
CFG_CCACHE_BASEDIR=${CFG_SRC_DIR}
977+
putvar CFG_CCACHE_BASEDIR
978+
fi
979+
980+
973981
if [ ! -z $BAD_PANDOC ]
974982
then
975983
CFG_PANDOC=

branches/snap-stage3/doc/rust.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -301,10 +301,10 @@ num_lit : nonzero_dec [ dec_digit | '_' ] * num_suffix ?
301301
num_suffix : int_suffix | float_suffix ;
302302
303303
int_suffix : 'u' int_suffix_size ?
304-
| 'i' int_suffix_size ;
304+
| 'i' int_suffix_size ? ;
305305
int_suffix_size : [ '8' | '1' '6' | '3' '2' | '6' '4' ] ;
306306
307-
float_suffix : [ exponent | '.' dec_lit exponent ? ] float_suffix_ty ? ;
307+
float_suffix : [ exponent | '.' dec_lit exponent ? ] ? float_suffix_ty ? ;
308308
float_suffix_ty : 'f' [ '3' '2' | '6' '4' ] ;
309309
exponent : ['E' | 'e'] ['-' | '+' ] ? dec_lit ;
310310
dec_lit : [ dec_digit | '_' ] + ;
@@ -1297,7 +1297,7 @@ with matching types and type parameter counts.
12971297

12981298
An implementation can take type parameters,
12991299
which can be different from the type parameters taken by the trait it implements.
1300-
Implementation parameters are written after after the `impl` keyword.
1300+
Implementation parameters are written after the `impl` keyword.
13011301

13021302
~~~~
13031303
# trait Seq<T> { }
@@ -1840,6 +1840,7 @@ is bounds-checked at run-time. When the check fails, it will put the
18401840
task in a _failing state_.
18411841

18421842
~~~~
1843+
# use std::task;
18431844
# do task::spawn_unlinked {
18441845
18451846
([1, 2, 3, 4])[0];
@@ -2032,7 +2033,8 @@ as
20322033
=
20332034
~~~~
20342035

2035-
Operators at the same precedence level are evaluated left-to-right.
2036+
Operators at the same precedence level are evaluated left-to-right. [Unary operators](#unary-operator-expressions)
2037+
have the same precedence level and it is stronger than any of the binary operators'.
20362038

20372039
### Grouped expressions
20382040

@@ -2168,7 +2170,7 @@ fn ten_times(f: &fn(int)) {
21682170
}
21692171
}
21702172
2171-
ten_times(|j| io::println(fmt!("hello, %d", j)));
2173+
ten_times(|j| println(fmt!("hello, %d", j)));
21722174
21732175
~~~~
21742176

@@ -2189,7 +2191,7 @@ An example:
21892191
let mut i = 0;
21902192
21912193
while i < 10 {
2192-
io::println("hello\n");
2194+
println("hello\n");
21932195
i = i + 1;
21942196
}
21952197
~~~~
@@ -2323,7 +2325,9 @@ An example of a for loop over the contents of a vector:
23232325
~~~~
23242326
# type foo = int;
23252327
# fn bar(f: foo) { }
2326-
# let a = 0, b = 0, c = 0;
2328+
# let a = 0;
2329+
# let b = 0;
2330+
# let c = 0;
23272331
23282332
let v: &[foo] = &[a, b, c];
23292333
@@ -2335,6 +2339,7 @@ for v.each |e| {
23352339
An example of a for loop over a series of integers:
23362340

23372341
~~~~
2342+
# use std::uint;
23382343
# fn bar(b:uint) { }
23392344
for uint::range(0, 256) |i| {
23402345
bar(i);
@@ -2798,6 +2803,7 @@ the vtable pointer for the `T` implementation of `R`, and the pointer value of `
27982803
An example of an object type:
27992804

28002805
~~~~~~~~
2806+
# use std::int;
28012807
trait Printable {
28022808
fn to_str(&self) -> ~str;
28032809
}
@@ -2807,7 +2813,7 @@ impl Printable for int {
28072813
}
28082814
28092815
fn print(a: @Printable) {
2810-
io::println(a.to_str());
2816+
println(a.to_str());
28112817
}
28122818
28132819
fn main() {
@@ -2996,7 +3002,7 @@ allocated within the stack's memory. The value is a part of the stack frame.
29963002

29973003
Local variables are immutable unless declared with `let mut`. The
29983004
`mut` keyword applies to all local variables declared within that
2999-
declaration (so `let mut x, y` declares two mutable variables, `x` and
3005+
declaration (so `let mut (x, y) = ...` declares two mutable variables, `x` and
30003006
`y`).
30013007

30023008
Function parameters are immutable unless declared with `mut`. The

branches/snap-stage3/doc/rustpkg.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ or the equivalent on Windows.
3030

3131
Each workspace may contain one or more packages.
3232

33+
When building code that contains one or more directives of the form `extern mod P`,
34+
rustpkg automatically searches for packages named `P` in the `RUST_PATH` (as described above).
35+
It builds those dependencies if necessary.
36+
Thus, when using rustpkg,
37+
there is no need for `-L` flags to tell the linker where to find libraries for external crates.
38+
3339
# Package structure
3440

3541
A valid workspace must contain each of the following subdirectories:
@@ -66,6 +72,10 @@ A package can be stored in a workspace on the local file system,
6672
or on a remote Web server, in which case the package ID resembles a URL.
6773
For example, `github.com/mozilla/rust` is a package ID
6874
that would refer to the git repository browsable at `http://github.com/mozilla/rust`.
75+
A package ID can also specify a version, like:
76+
`github.com/mozilla/rust#0.3`.
77+
In this case, `rustpkg` will check that the repository `github.com/mozilla/rust` has a tag named `0.3`,
78+
and report an error otherwise.
6979

7080
## Source files
7181

@@ -76,6 +86,15 @@ rustpkg searches for four different fixed filenames in order to determine the cr
7686
* `test.rs`: Assumed to contain tests declared with the `#[test]` attribute.
7787
* `bench.rs`: Assumed to contain benchmarks declared with the `#[bench]` attribute.
7888

89+
## Versions
90+
91+
`rustpkg` packages do not need to declare their versions with an attribute inside one of the source files,
92+
because `rustpkg` infers it from the version control system.
93+
When building a package that is in a `git` repository,
94+
`rustpkg` assumes that the most recent tag specifies the current version.
95+
When building a package that is not under version control,
96+
or that has no tags, `rustpkg` assumes the intended version is 0.1.
97+
7998
# Custom build scripts
8099

81100
A file called `pkg.rs` at the root level in a workspace is called a *package script*.

branches/snap-stage3/doc/tutorial-ffi.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,17 +149,18 @@ A type with the same functionality as owned boxes can be implemented by
149149
wrapping `malloc` and `free`:
150150

151151
~~~~
152+
use std::cast;
152153
use std::libc::{c_void, size_t, malloc, free};
154+
use std::ptr;
153155
use std::unstable::intrinsics;
154-
use std::util;
155156
156157
// a wrapper around the handle returned by the foreign code
157158
pub struct Unique<T> {
158159
priv ptr: *mut T
159160
}
160161
161-
pub impl<T: Owned> Unique<T> {
162-
fn new(value: T) -> Unique<T> {
162+
impl<T: Owned> Unique<T> {
163+
pub fn new(value: T) -> Unique<T> {
163164
unsafe {
164165
let ptr = malloc(std::sys::size_of::<T>() as size_t) as *mut T;
165166
assert!(!ptr::is_null(ptr));
@@ -170,12 +171,12 @@ pub impl<T: Owned> Unique<T> {
170171
}
171172
172173
// the 'r lifetime results in the same semantics as `&*x` with ~T
173-
fn borrow<'r>(&'r self) -> &'r T {
174+
pub fn borrow<'r>(&'r self) -> &'r T {
174175
unsafe { cast::copy_lifetime(self, &*self.ptr) }
175176
}
176177
177178
// the 'r lifetime results in the same semantics as `&mut *x` with ~T
178-
fn borrow_mut<'r>(&'r mut self) -> &'r mut T {
179+
pub fn borrow_mut<'r>(&'r mut self) -> &'r mut T {
179180
unsafe { cast::copy_mut_lifetime(self, &mut *self.ptr) }
180181
}
181182
}
@@ -184,9 +185,9 @@ pub impl<T: Owned> Unique<T> {
184185
impl<T: Owned> Drop for Unique<T> {
185186
fn finalize(&self) {
186187
unsafe {
187-
let mut x = intrinsics::init(); // dummy value to swap in
188+
let x = intrinsics::init(); // dummy value to swap in
188189
// moving the object out is needed to call the destructor
189-
util::replace_ptr(self.ptr, x);
190+
ptr::replace_ptr(self.ptr, x);
190191
free(self.ptr as *c_void)
191192
}
192193
}

branches/snap-stage3/doc/tutorial-macros.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ doing nothing otherwise:
1313
~~~~
1414
# enum t { special_a(uint), special_b(uint) };
1515
# fn f() -> uint {
16-
# let input_1 = special_a(0), input_2 = special_a(0);
16+
# let input_1 = special_a(0);
17+
# let input_2 = special_a(0);
1718
match input_1 {
1819
special_a(x) => { return x; }
1920
_ => {}
@@ -38,7 +39,8 @@ the pattern in the above code:
3839
~~~~
3940
# enum t { special_a(uint), special_b(uint) };
4041
# fn f() -> uint {
41-
# let input_1 = special_a(0), input_2 = special_a(0);
42+
# let input_1 = special_a(0);
43+
# let input_2 = special_a(0);
4244
macro_rules! early_return(
4345
($inp:expr $sp:ident) => ( // invoke it like `(input_5 special_e)`
4446
match $inp {
@@ -155,7 +157,8 @@ instead of `*` to mean "at least one".
155157
~~~~
156158
# enum t { special_a(uint),special_b(uint),special_c(uint),special_d(uint)};
157159
# fn f() -> uint {
158-
# let input_1 = special_a(0), input_2 = special_a(0);
160+
# let input_1 = special_a(0);
161+
# let input_2 = special_a(0);
159162
macro_rules! early_return(
160163
($inp:expr, [ $($sp:ident)|+ ]) => (
161164
match $inp {

0 commit comments

Comments
 (0)