Skip to content

Commit ec059f6

Browse files
committed
---
yaml --- r: 63028 b: refs/heads/snap-stage3 c: e2bedb1 h: refs/heads/master v: v3
1 parent b4122ef commit ec059f6

File tree

848 files changed

+9339
-12395
lines changed

Some content is hidden

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

848 files changed

+9339
-12395
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: 4a19af1b03c0099eed8033bd28b0eaae9f926552
4+
refs/heads/snap-stage3: e2bedb1b868a634885df9f8a277bec1915c98fc2
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

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: 1 addition & 8 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* | 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
;;
@@ -970,13 +970,6 @@ then
970970
putvar CFG_CCACHE_CPP2
971971
fi
972972

973-
if [ ! -z "$CFG_ENABLE_CCACHE" ]
974-
then
975-
CFG_CCACHE_BASEDIR=${CFG_SRC_DIR}
976-
putvar CFG_CCACHE_BASEDIR
977-
fi
978-
979-
980973
if [ ! -z $BAD_PANDOC ]
981974
then
982975
CFG_PANDOC=

branches/snap-stage3/doc/rust.md

Lines changed: 8 additions & 14 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 | '_' ] + ;
@@ -1840,7 +1840,6 @@ 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;
18441843
# do task::spawn_unlinked {
18451844
18461845
([1, 2, 3, 4])[0];
@@ -2033,8 +2032,7 @@ as
20332032
=
20342033
~~~~
20352034

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'.
2035+
Operators at the same precedence level are evaluated left-to-right.
20382036

20392037
### Grouped expressions
20402038

@@ -2170,7 +2168,7 @@ fn ten_times(f: &fn(int)) {
21702168
}
21712169
}
21722170
2173-
ten_times(|j| println(fmt!("hello, %d", j)));
2171+
ten_times(|j| io::println(fmt!("hello, %d", j)));
21742172
21752173
~~~~
21762174

@@ -2191,7 +2189,7 @@ An example:
21912189
let mut i = 0;
21922190
21932191
while i < 10 {
2194-
println("hello\n");
2192+
io::println("hello\n");
21952193
i = i + 1;
21962194
}
21972195
~~~~
@@ -2325,9 +2323,7 @@ An example of a for loop over the contents of a vector:
23252323
~~~~
23262324
# type foo = int;
23272325
# fn bar(f: foo) { }
2328-
# let a = 0;
2329-
# let b = 0;
2330-
# let c = 0;
2326+
# let a = 0, b = 0, c = 0;
23312327
23322328
let v: &[foo] = &[a, b, c];
23332329
@@ -2339,7 +2335,6 @@ for v.each |e| {
23392335
An example of a for loop over a series of integers:
23402336

23412337
~~~~
2342-
# use std::uint;
23432338
# fn bar(b:uint) { }
23442339
for uint::range(0, 256) |i| {
23452340
bar(i);
@@ -2803,7 +2798,6 @@ the vtable pointer for the `T` implementation of `R`, and the pointer value of `
28032798
An example of an object type:
28042799

28052800
~~~~~~~~
2806-
# use std::int;
28072801
trait Printable {
28082802
fn to_str(&self) -> ~str;
28092803
}
@@ -2813,7 +2807,7 @@ impl Printable for int {
28132807
}
28142808
28152809
fn print(a: @Printable) {
2816-
println(a.to_str());
2810+
io::println(a.to_str());
28172811
}
28182812
28192813
fn main() {
@@ -3002,7 +2996,7 @@ allocated within the stack's memory. The value is a part of the stack frame.
30022996

30032997
Local variables are immutable unless declared with `let mut`. The
30042998
`mut` keyword applies to all local variables declared within that
3005-
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
30063000
`y`).
30073001

30083002
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
}

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ doing nothing otherwise:
1313
~~~~
1414
# enum t { special_a(uint), special_b(uint) };
1515
# fn f() -> uint {
16-
# let input_1 = special_a(0);
17-
# let input_2 = special_a(0);
16+
# let input_1 = special_a(0), input_2 = special_a(0);
1817
match input_1 {
1918
special_a(x) => { return x; }
2019
_ => {}
@@ -39,8 +38,7 @@ the pattern in the above code:
3938
~~~~
4039
# enum t { special_a(uint), special_b(uint) };
4140
# fn f() -> uint {
42-
# let input_1 = special_a(0);
43-
# let input_2 = special_a(0);
41+
# let input_1 = special_a(0), input_2 = special_a(0);
4442
macro_rules! early_return(
4543
($inp:expr $sp:ident) => ( // invoke it like `(input_5 special_e)`
4644
match $inp {
@@ -157,8 +155,7 @@ instead of `*` to mean "at least one".
157155
~~~~
158156
# enum t { special_a(uint),special_b(uint),special_c(uint),special_d(uint)};
159157
# fn f() -> uint {
160-
# let input_1 = special_a(0);
161-
# let input_2 = special_a(0);
158+
# let input_1 = special_a(0), input_2 = special_a(0);
162159
macro_rules! early_return(
163160
($inp:expr, [ $($sp:ident)|+ ]) => (
164161
match $inp {

0 commit comments

Comments
 (0)