Skip to content

Commit 0d1a304

Browse files
committed
---
yaml --- r: 63245 b: refs/heads/snap-stage3 c: 8428081 h: refs/heads/master i: 63243: d8f9be9 v: v3
1 parent f84b8ce commit 0d1a304

File tree

1,002 files changed

+16976
-62969
lines changed

Some content is hidden

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

1,002 files changed

+16976
-62969
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: 91bced8ae850f18395ae33e3b982e1e6e97e2c78
4+
refs/heads/snap-stage3: 84280819585fb65bf18903aef9364579f3552522
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@
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: 0 additions & 12 deletions
This file was deleted.

branches/snap-stage3/CONTRIBUTING.md

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

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:
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:
106

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.
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!
1410

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!
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.
1815

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.
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.
2519

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:
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:
3622

3723
```
3824
// Copyright 2010-2013 The Rust Project Developers.
3925
```
4026

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

branches/snap-stage3/Makefile.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ 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) rev-parse HEAD)
149+
CFG_VER_HASH = $(shell git --git-dir=$(CFG_GIT_DIR) log -1 \
150+
--pretty=format:'%H')
150151
endif
151152
endif
152153

branches/snap-stage3/configure

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ validate_opt () {
138138
done
139139
if [ "$arg" = "--help" ]
140140
then
141-
echo
141+
echo ""
142142
echo "No more help available for Configure options,"
143143
echo "check the Uncyclo or join our IRC channel"
144144
break
@@ -349,11 +349,11 @@ if [ "$1" = "--help" ]
349349
then
350350
HELP=1
351351
shift
352-
echo
352+
echo ""
353353
echo "Usage: $CFG_SELF [options]"
354-
echo
354+
echo ""
355355
echo "Options:"
356-
echo
356+
echo ""
357357
else
358358
msg "recreating config.tmp"
359359
echo '' >config.tmp
@@ -394,7 +394,7 @@ validate_opt
394394

395395
if [ $HELP -eq 1 ]
396396
then
397-
echo
397+
echo ""
398398
exit 0
399399
fi
400400

@@ -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* | 3.4* )
564+
(3.0svn | 3.0 | 3.1* | 3.2* | 3.3*)
565565
step_msg "found ok version of CLANG: $CFG_CLANG_VERSION"
566566
CFG_C_COMPILER="clang"
567567
;;
@@ -683,8 +683,7 @@ 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 \
687-
jemalloc
686+
libuv libuv/src/ares libuv/src/eio libuv/src/ev
688687
do
689688
make_dir rt/$t/stage$s/$i
690689
done
@@ -971,13 +970,6 @@ then
971970
putvar CFG_CCACHE_CPP2
972971
fi
973972

974-
if [ ! -z "$CFG_ENABLE_CCACHE" ]
975-
then
976-
CFG_CCACHE_BASEDIR=${CFG_SRC_DIR}
977-
putvar CFG_CCACHE_BASEDIR
978-
fi
979-
980-
981973
if [ ! -z $BAD_PANDOC ]
982974
then
983975
CFG_PANDOC=

branches/snap-stage3/doc/rust.md

Lines changed: 17 additions & 18 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 | '_' ] + ;
@@ -803,14 +803,19 @@ An example of `use` declarations:
803803

804804
~~~~
805805
use std::float::sin;
806-
use std::option::{Some, None};
806+
use std::str::{slice, contains};
807+
use std::option::Some;
807808
808809
fn main() {
809810
// Equivalent to 'info!(std::float::sin(1.0));'
810811
info!(sin(1.0));
811812
812-
// Equivalent to 'info!(~[std::option::Some(1.0), std::option::None]);'
813-
info!(~[Some(1.0), None]);
813+
// Equivalent to 'info!(std::option::Some(1.0));'
814+
info!(Some(1.0));
815+
816+
// Equivalent to
817+
// 'info!(std::str::contains(std::str::slice("foo", 0, 1), "oo"));'
818+
info!(contains(slice("foo", 0, 1), "oo"));
814819
}
815820
~~~~
816821

@@ -1292,7 +1297,7 @@ with matching types and type parameter counts.
12921297

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

12971302
~~~~
12981303
# trait Seq<T> { }
@@ -1835,7 +1840,6 @@ is bounds-checked at run-time. When the check fails, it will put the
18351840
task in a _failing state_.
18361841

18371842
~~~~
1838-
# use std::task;
18391843
# do task::spawn_unlinked {
18401844
18411845
([1, 2, 3, 4])[0];
@@ -2028,8 +2032,7 @@ as
20282032
=
20292033
~~~~
20302034

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

20342037
### Grouped expressions
20352038

@@ -2165,7 +2168,7 @@ fn ten_times(f: &fn(int)) {
21652168
}
21662169
}
21672170
2168-
ten_times(|j| println(fmt!("hello, %d", j)));
2171+
ten_times(|j| io::println(fmt!("hello, %d", j)));
21692172
21702173
~~~~
21712174

@@ -2186,7 +2189,7 @@ An example:
21862189
let mut i = 0;
21872190
21882191
while i < 10 {
2189-
println("hello\n");
2192+
io::println("hello\n");
21902193
i = i + 1;
21912194
}
21922195
~~~~
@@ -2320,9 +2323,7 @@ An example of a for loop over the contents of a vector:
23202323
~~~~
23212324
# type foo = int;
23222325
# fn bar(f: foo) { }
2323-
# let a = 0;
2324-
# let b = 0;
2325-
# let c = 0;
2326+
# let a = 0, b = 0, c = 0;
23262327
23272328
let v: &[foo] = &[a, b, c];
23282329
@@ -2334,7 +2335,6 @@ for v.each |e| {
23342335
An example of a for loop over a series of integers:
23352336

23362337
~~~~
2337-
# use std::uint;
23382338
# fn bar(b:uint) { }
23392339
for uint::range(0, 256) |i| {
23402340
bar(i);
@@ -2798,7 +2798,6 @@ the vtable pointer for the `T` implementation of `R`, and the pointer value of `
27982798
An example of an object type:
27992799

28002800
~~~~~~~~
2801-
# use std::int;
28022801
trait Printable {
28032802
fn to_str(&self) -> ~str;
28042803
}
@@ -2808,7 +2807,7 @@ impl Printable for int {
28082807
}
28092808
28102809
fn print(a: @Printable) {
2811-
println(a.to_str());
2810+
io::println(a.to_str());
28122811
}
28132812
28142813
fn main() {
@@ -2997,7 +2996,7 @@ allocated within the stack's memory. The value is a part of the stack frame.
29972996

29982997
Local variables are immutable unless declared with `let mut`. The
29992998
`mut` keyword applies to all local variables declared within that
3000-
declaration (so `let mut (x, y) = ...` declares two mutable variables, `x` and
2999+
declaration (so `let mut x, y` declares two mutable variables, `x` and
30013000
`y`).
30023001

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

branches/snap-stage3/doc/rustpkg.md

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,6 @@ 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-
3933
# Package structure
4034

4135
A valid workspace must contain each of the following subdirectories:
@@ -72,10 +66,6 @@ A package can be stored in a workspace on the local file system,
7266
or on a remote Web server, in which case the package ID resembles a URL.
7367
For example, `github.com/mozilla/rust` is a package ID
7468
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.
7969

8070
## Source files
8171

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

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-
9879
# Custom build scripts
9980

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

151151
~~~~
152-
use std::cast;
153152
use std::libc::{c_void, size_t, malloc, free};
154-
use std::ptr;
155153
use std::unstable::intrinsics;
154+
use std::util;
156155
157156
// a wrapper around the handle returned by the foreign code
158157
pub struct Unique<T> {
159158
priv ptr: *mut T
160159
}
161160
162-
impl<T: Owned> Unique<T> {
163-
pub fn new(value: T) -> Unique<T> {
161+
pub impl<T: Owned> Unique<T> {
162+
fn new(value: T) -> Unique<T> {
164163
unsafe {
165164
let ptr = malloc(std::sys::size_of::<T>() as size_t) as *mut T;
166165
assert!(!ptr::is_null(ptr));
@@ -171,12 +170,12 @@ impl<T: Owned> Unique<T> {
171170
}
172171
173172
// the 'r lifetime results in the same semantics as `&*x` with ~T
174-
pub fn borrow<'r>(&'r self) -> &'r T {
173+
fn borrow<'r>(&'r self) -> &'r T {
175174
unsafe { cast::copy_lifetime(self, &*self.ptr) }
176175
}
177176
178177
// the 'r lifetime results in the same semantics as `&mut *x` with ~T
179-
pub fn borrow_mut<'r>(&'r mut self) -> &'r mut T {
178+
fn borrow_mut<'r>(&'r mut self) -> &'r mut T {
180179
unsafe { cast::copy_mut_lifetime(self, &mut *self.ptr) }
181180
}
182181
}
@@ -185,9 +184,9 @@ impl<T: Owned> Unique<T> {
185184
impl<T: Owned> Drop for Unique<T> {
186185
fn finalize(&self) {
187186
unsafe {
188-
let x = intrinsics::init(); // dummy value to swap in
187+
let mut x = intrinsics::init(); // dummy value to swap in
189188
// moving the object out is needed to call the destructor
190-
ptr::replace_ptr(self.ptr, x);
189+
util::replace_ptr(self.ptr, x);
191190
free(self.ptr as *c_void)
192191
}
193192
}

0 commit comments

Comments
 (0)