Skip to content

Commit 4749e5c

Browse files
committed
---
yaml --- r: 80565 b: refs/heads/master c: af72e41 h: refs/heads/master i: 80563: 0154c7b v: v3
1 parent d685f76 commit 4749e5c

File tree

359 files changed

+3957
-10038
lines changed

Some content is hidden

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

359 files changed

+3957
-10038
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 460021bdf2106ee76daf7d81ec7e50e972e26901
2+
refs/heads/master: af72e4108d46673f17cdcad125d2049d296d89cf
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cbd1eefbd350797b783df119fed7956d7e1c74ad
55
refs/heads/try: 71bebebc37fbb229877da88dde13c2f35913bd77

trunk/.gitattributes

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
[attr]rust text eol=lf whitespace=tab-in-indent,trailing-space,tabwidth=4
22

3-
* text eol=lf
3+
* text=auto
44
*.cpp rust
55
*.h rust
66
*.rs rust
77
src/rt/msvc/* -whitespace
88
src/rt/vg/* -whitespace
99
src/rt/linenoise/* -whitespace
1010
src/rt/jemalloc/**/* -whitespace
11+
src/rt/jemalloc/include/jemalloc/jemalloc.h.in text eol=lf
12+
src/rt/jemalloc/include/jemalloc/jemalloc_defs.h.in text eol=lf
13+
src/rt/jemalloc/include/jemalloc/internal/jemalloc_internal.h.in text eol=lf

trunk/Makefile.in

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ CFG_LIBRUSTC_$(1) :=$(call CFG_LIB_NAME_$(1),rustc)
214214
CFG_LIBSYNTAX_$(1) :=$(call CFG_LIB_NAME_$(1),syntax)
215215
CFG_LIBRUSTPKG_$(1) :=$(call CFG_LIB_NAME_$(1),rustpkg)
216216
CFG_LIBRUSTDOC_$(1) :=$(call CFG_LIB_NAME_$(1),rustdoc)
217-
CFG_LIBRUSTDOCNG_$(1) :=$(call CFG_LIB_NAME_$(1),rustdoc_ng)
218217
CFG_LIBRUSTI_$(1) :=$(call CFG_LIB_NAME_$(1),rusti)
219218
CFG_LIBRUST_$(1) :=$(call CFG_LIB_NAME_$(1),rust)
220219

@@ -224,7 +223,6 @@ LIBRUSTC_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rustc)
224223
LIBSYNTAX_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),syntax)
225224
LIBRUSTPKG_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rustpkg)
226225
LIBRUSTDOC_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rustdoc)
227-
LIBRUSTDOCNG_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rustdoc_ng)
228226
LIBRUSTI_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rusti)
229227
LIBRUST_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rust)
230228
EXTRALIB_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),extra)
@@ -233,7 +231,6 @@ LIBRUSTC_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rustc)
233231
LIBSYNTAX_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),syntax)
234232
LIBRUSTPKG_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rustpkg)
235233
LIBRUSTDOC_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rustdoc)
236-
LIBRUSTDOCNG_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rustdoc_ng)
237234
LIBRUSTI_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rusti)
238235
LIBRUST_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rust)
239236

@@ -442,12 +439,10 @@ CSREQ$(1)_T_$(2)_H_$(3) = \
442439
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
443440
$$(HBIN$(1)_H_$(3))/rustpkg$$(X_$(3)) \
444441
$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) \
445-
$$(HBIN$(1)_H_$(3))/rustdoc_ng$$(X_$(3)) \
446442
$$(HBIN$(1)_H_$(3))/rusti$$(X_$(3)) \
447443
$$(HBIN$(1)_H_$(3))/rust$$(X_$(3)) \
448444
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTPKG_$(3)) \
449445
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTDOC_$(3)) \
450-
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTDOCNG_$(3)) \
451446
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTI_$(3)) \
452447
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUST_$(3)) \
453448
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2)) \
@@ -456,7 +451,6 @@ CSREQ$(1)_T_$(2)_H_$(3) = \
456451
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(2)) \
457452
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTPKG_$(2)) \
458453
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTDOC_$(2)) \
459-
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTDOCNG_$(2)) \
460454
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTI_$(2)) \
461455
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUST_$(2))
462456

trunk/doc/rust.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1717,8 +1717,7 @@ Supported traits for `deriving` are:
17171717
* `Clone` and `DeepClone`, to perform (deep) copies.
17181718
* `IterBytes`, to iterate over the bytes in a data type.
17191719
* `Rand`, to create a random instance of a data type.
1720-
* `Default`, to create an empty instance of a data type.
1721-
* `Zero`, to create an zero instance of a numeric data type.
1720+
* `Zero`, to create an zero (or empty) instance of a data type.
17221721
* `ToStr`, to convert to a string. For a type with this instance,
17231722
`obj.to_str()` has similar output as `fmt!("%?", obj)`, but it differs in that
17241723
each constituent field of the type must also implement `ToStr` and will have

trunk/doc/rustpkg.md

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,13 @@ A valid workspace must contain each of the following subdirectories:
5252
rustpkg will install libraries for bar to `foo/lib/x86_64-apple-darwin/`.
5353
The libraries will have names of the form `foo/lib/x86_64-apple-darwin/libbar-[hash].dylib`,
5454
where [hash] is a hash of the package ID.
55-
* 'bin/': `rustpkg install` installs executable binaries into this directory.
55+
* 'bin/': `rustpkg install` installs executable binaries into a target-specific subdirectory of this directory.
5656

57-
For example, rustpkg will install executables for `bar` to
58-
`foo/bin`.
59-
The executables will have names of the form `foo/bin/bar`.
57+
For example, on a 64-bit machine running Mac OS X,
58+
if `foo` is a workspace, containing the package `bar`,
59+
rustpkg will install executables for `bar` to
60+
`foo/bin/x86_64-apple-darwin/`.
61+
The executables will have names of the form `foo/bin/x86_64-apple-darwin/bar`.
6062
* 'build/': `rustpkg build` stores temporary build artifacts in a target-specific subdirectory of this directory.
6163

6264
For example, on a 64-bit machine running Mac OS X,
@@ -83,12 +85,6 @@ rustpkg also interprets any dependencies on such a package ID literally
8385
Thus, `github.com/mozilla/rust#5c4cd30f80` is also a valid package ID,
8486
since git can deduce that 5c4cd30f80 refers to a revision of the desired repository.
8587

86-
A package identifier can name a subdirectory of another package.
87-
For example, if `foo` is a workspace, and `foo/src/bar/lib.rs` exists,
88-
as well as `foo/src/bar/extras/baz/lib.rs`,
89-
then both `bar` and `bar/extras/baz` are valid package identifiers
90-
in the workspace `foo`.
91-
9288
## Source files
9389

9490
rustpkg searches for four different fixed filenames in order to determine the crates to build:
@@ -144,11 +140,9 @@ but not in their `lib` or `bin` directories.
144140

145141
## install
146142

147-
`rustpkg install foo` builds the libraries and/or executables that are targets for `foo`.
148-
If `RUST_PATH` is declared as an environment variable, then rustpkg installs the
149-
libraries and executables into the `lib` and `bin` subdirectories
150-
of the first entry in `RUST_PATH`.
151-
Otherwise, it installs them into `foo`'s `lib` and `bin` directories.
143+
`rustpkg install foo` builds the libraries and/or executables that are targets for `foo`,
144+
and then installs them either into `foo`'s `lib` and `bin` directories,
145+
or into the `lib` and `bin` subdirectories of the first entry in `RUST_PATH`.
152146

153147
## test
154148

trunk/doc/tutorial-conditions.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ fn read_int_pairs() -> ~[(int,int)] {
9191
[a, b] => {
9292
9393
// 5. Try parsing both fields as ints.
94-
match (from_str::<int>(a), from_str::<int>(b)) {
94+
match (int::from_str(a), int::from_str(b)) {
9595
9696
// 6. If parsing succeeded for both, push both.
9797
(Some(a), Some(b)) => pairs.push((a,b)),
@@ -124,7 +124,7 @@ for conveying a value of type `T`, represented as `Some(T)`
124124
_or_ the sentinel `None`, to indicate the absence of a `T` value.
125125
For simple APIs, it may be sufficient to encode errors as `Option<T>`,
126126
returning `Some(T)` on success and `None` on error.
127-
In the example program, the call to `from_str::<int>` returns `Option<int>`
127+
In the example program, the call to `int::from_str` returns `Option<int>`
128128
with the understanding that "all parse errors" result in `None`.
129129
The resulting `Option<int>` values are matched against the pattern `(Some(a), Some(b))`
130130
in steps 5 and 6 in the example program,
@@ -161,7 +161,7 @@ This second mechanism for indicating an error is called a `Result`.
161161
The type `std::result::Result<T,E>` is another simple `enum` type with two forms, `Ok(T)` and `Err(E)`.
162162
The `Result` type is not substantially different from the `Option` type in terms of its ergonomics.
163163
Its main advantage is that the error constructor `Err(E)` can convey _more detail_ about the error.
164-
For example, the `from_str` API could be reformed
164+
For example, the `int::from_str` API could be reformed
165165
to return a `Result` carrying an informative description of a parse error,
166166
like this:
167167

@@ -172,7 +172,7 @@ enum IntParseErr {
172172
BadChar(char)
173173
}
174174
175-
fn from_str(&str) -> Result<int,IntParseErr> {
175+
fn int::from_str(&str) -> Result<int,IntParseErr> {
176176
// ...
177177
}
178178
~~~~
@@ -297,8 +297,8 @@ fn read_int_pairs() -> ~[(int,int)] {
297297
let line = fi.read_line();
298298
let fields = line.word_iter().to_owned_vec();
299299
match fields {
300-
[a, b] => pairs.push((from_str::<int>(a).unwrap(),
301-
from_str::<int>(b).unwrap())),
300+
[a, b] => pairs.push((int::from_str(a).unwrap(),
301+
int::from_str(b).unwrap())),
302302
303303
// Explicitly fail on malformed lines.
304304
_ => fail!()
@@ -398,8 +398,8 @@ fn read_int_pairs() -> ~[(int,int)] {
398398
let line = fi.read_line();
399399
let fields = line.word_iter().to_owned_vec();
400400
match fields {
401-
[a, b] => pairs.push((from_str::<int>(a).unwrap(),
402-
from_str::<int>(b).unwrap())),
401+
[a, b] => pairs.push((int::from_str(a).unwrap(),
402+
int::from_str(b).unwrap())),
403403
404404
// On malformed lines, call the condition handler and
405405
// push whatever the condition handler returns.
@@ -475,8 +475,8 @@ fn read_int_pairs() -> ~[(int,int)] {
475475
let line = fi.read_line();
476476
let fields = line.word_iter().to_owned_vec();
477477
match fields {
478-
[a, b] => pairs.push((from_str::<int>(a).unwrap(),
479-
from_str::<int>(b).unwrap())),
478+
[a, b] => pairs.push((int::from_str(a).unwrap(),
479+
int::from_str(b).unwrap())),
480480
_ => pairs.push(malformed_line::cond.raise(line.clone()))
481481
}
482482
}
@@ -553,8 +553,8 @@ fn read_int_pairs() -> ~[(int,int)] {
553553
let line = fi.read_line();
554554
let fields = line.word_iter().to_owned_vec();
555555
match fields {
556-
[a, b] => pairs.push((from_str::<int>(a).unwrap(),
557-
from_str::<int>(b).unwrap())),
556+
[a, b] => pairs.push((int::from_str(a).unwrap(),
557+
int::from_str(b).unwrap())),
558558
559559
// On malformed lines, call the condition handler and
560560
// either ignore the line (if the handler returns `None`)
@@ -649,8 +649,8 @@ fn read_int_pairs() -> ~[(int,int)] {
649649
let line = fi.read_line();
650650
let fields = line.word_iter().to_owned_vec();
651651
match fields {
652-
[a, b] => pairs.push((from_str::<int>(a).unwrap(),
653-
from_str::<int>(b).unwrap())),
652+
[a, b] => pairs.push((int::from_str(a).unwrap(),
653+
int::from_str(b).unwrap())),
654654
655655
// On malformed lines, call the condition handler and
656656
// take action appropriate to the enum value returned.
@@ -776,7 +776,7 @@ fn main() {
776776
// Parse an int; if parsing fails, call the condition handler and
777777
// return whatever it returns.
778778
fn parse_int(x: &str) -> int {
779-
match from_str::<int>(x) {
779+
match int::from_str(x) {
780780
Some(v) => v,
781781
None => malformed_int::cond.raise(x.to_owned())
782782
}
@@ -833,8 +833,8 @@ There are three other things to note in this variant of the example program:
833833
so long as the `raise` occurs within a callee (of any depth) of the logic protected by the `trap` call,
834834
it will invoke the handler.
835835

836-
- This variant insulates callers from a design choice in the library:
837-
the `from_str` function was designed to return an `Option<int>`,
836+
- This variant insulates callers from a design choice in the `int` library:
837+
the `int::from_str` function was designed to return an `Option<int>`,
838838
but this program insulates callers from that choice,
839839
routing all `None` values that arise from parsing integers in this file into the condition.
840840

@@ -873,4 +873,4 @@ To compensate for this risk, correct C++ and Java code must program in an extrem
873873
or else risk introducing silent and very difficult-to-debug errors due to control resuming in a corrupted heap after a caught exception.
874874
These errors are frequently memory-safety errors, which Rust strives to eliminate,
875875
and so Rust unwinding is unrecoverable within a single task:
876-
once unwinding starts, the entire local heap of a task is destroyed and the task is terminated.
876+
once unwinding starts, the entire local heap of a task is destroyed and the task is terminated.

trunk/doc/tutorial-ffi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ impl<T: Send> Unique<T> {
321321
322322
#[unsafe_destructor]
323323
impl<T: Send> Drop for Unique<T> {
324-
fn drop(&mut self) {
324+
fn drop(&self) {
325325
#[fixed_stack_segment];
326326
#[inline(never)];
327327

0 commit comments

Comments
 (0)