Skip to content

Commit 6bb5892

Browse files
committed
---
yaml --- r: 151352 b: refs/heads/try2 c: 2dcbad5 h: refs/heads/master v: v3
1 parent 0bf7e42 commit 6bb5892

File tree

395 files changed

+9001
-5451
lines changed

Some content is hidden

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

395 files changed

+9001
-5451
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: 022a01d40c7fd9693f1b10607912605a6fc898b8
8+
refs/heads/try2: 2dcbad5bc40b3ef7d1150db12fba1d653b1c3b16
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/AUTHORS.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,7 @@ Raphael Speyer <[email protected]>
362362
reedlepee <[email protected]>
363363
Reuben Morais <[email protected]>
364364
Richard Diamond <[email protected]>
365+
Richo Healey <[email protected]>
365366
Rick Waldron <[email protected]>
366367
Rob Arnold <[email protected]>
367368
Rob Hoelz <[email protected]>

branches/try2/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ message explaining why.
3333

3434
In the licensing header at the beginning of any files you change,
3535
please make sure the listed date range includes the current year. For
36-
example, if it's 2013, and you change a Rust file that was created in
36+
example, if it's 2014, and you change a Rust file that was created in
3737
2010, it should begin:
3838

3939
```
40-
// Copyright 2010-2013 The Rust Project Developers.
40+
// Copyright 2010-2014 The Rust Project Developers.
4141
```
4242

4343
For more details, please refer to

branches/try2/LICENSE-MIT

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
Copyright (c) 2006-2009 Graydon Hoare
2-
Copyright (c) 2009-2014 Mozilla Foundation
1+
Copyright (c) 2014 The Rust Project Developers
32

43
Permission is hereby granted, free of charge, to any
54
person obtaining a copy of this software and associated

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.4 or `clang++` 3.x
23+
* `g++` 4.7 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/RELEASES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Version 0.10 (April 2014)
6363
documentation index page.
6464
* std: `std::condition` has been removed. All I/O errors are now propagated
6565
through the `Result` type. In order to assist with error handling, a
66-
`try!` macro for unwrapping errors with an early return and an lint for
66+
`try!` macro for unwrapping errors with an early return and a lint for
6767
unused results has been added. See #12039 for more information.
6868
* std: The `vec` module has been renamed to `slice`.
6969
* std: A new vector type, `Vec<T>`, has been added in preparation for DST.

branches/try2/mk/crates.mk

Lines changed: 2 additions & 1 deletion
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
54+
workcache url log regex graphviz
5555
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros
5656
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5757
TOOLS := compiletest rustdoc rustc
@@ -67,6 +67,7 @@ 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
7071
DEPS_glob := std
7172
DEPS_serialize := std collections log
7273
DEPS_term := std collections

branches/try2/mk/docs.mk

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,26 @@ doc/footer.inc: $(D)/footer.inc | doc/
141141
@$(call E, cp: $@)
142142
$(Q)cp -a $< $@ 2> /dev/null
143143

144+
doc/FiraSans-Regular.woff: $(D)/FiraSans-Regular.woff | doc/
145+
@$(call E, cp: $@)
146+
$(Q)cp -a $< $@ 2> /dev/null
147+
148+
doc/FiraSans-Medium.woff: $(D)/FiraSans-Medium.woff | doc/
149+
@$(call E, cp: $@)
150+
$(Q)cp -a $< $@ 2> /dev/null
151+
152+
doc/Heuristica-Regular.woff: $(D)/Heuristica-Regular.woff | doc/
153+
@$(call E, cp: $@)
154+
$(Q)cp -a $< $@ 2> /dev/null
155+
156+
doc/Heuristica-Italic.woff: $(D)/Heuristica-Italic.woff | doc/
157+
@$(call E, cp: $@)
158+
$(Q)cp -a $< $@ 2> /dev/null
159+
160+
doc/Heuristica-Bold.woff: $(D)/Heuristica-Bold.woff | doc/
161+
@$(call E, cp: $@)
162+
$(Q)cp -a $< $@ 2> /dev/null
163+
144164
# The (english) documentation for each doc item.
145165

146166
define DEF_SHOULD_BUILD_PDF_DOC

branches/try2/mk/platform.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ CFG_PATH_MUNGE_arm-unknown-linux-gnueabihf := true
330330
CFG_LDPATH_arm-unknown-linux-gnueabihf :=
331331
CFG_RUN_arm-unknown-linux-gnueabihf=$(2)
332332
CFG_RUN_TARG_arm-unknown-linux-gnueabihf=$(call CFG_RUN_arm-unknown-linux-gnueabihf,,$(2))
333-
RUSTC_FLAGS_arm-unknown-linux-gnueabihf := -C target-feature=+v7,+vfp3
333+
RUSTC_FLAGS_arm-unknown-linux-gnueabihf := -C target-feature=+v6,+vfp2
334334
RUSTC_CROSS_FLAGS_arm-unknown-linux-gnueabihf :=
335335

336336
# arm-unknown-linux-gnueabi configuration

branches/try2/mk/tests.mk

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,16 @@ TESTDEP_$(1)_$(2)_$(3)_$(4) = $$(SREQ$(1)_T_$(2)_H_$(3)) \
349349
$$(foreach crate,$$(TARGET_CRATES),\
350350
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$$(crate)) \
351351
$$(CRATE_FULLDEPS_$(1)_T_$(2)_H_$(3)_$(4))
352+
353+
# The regex crate depends on the regex_macros crate during testing, but it
354+
# notably depend on the *host* regex_macros crate, not the target version.
355+
# Additionally, this is not a dependency in stage1, only in stage2.
356+
ifeq ($(4),regex)
357+
ifneq ($(1),1)
358+
TESTDEP_$(1)_$(2)_$(3)_$(4) += $$(TLIB$(1)_T_$(3)_H_$(3))/stamp.regex_macros
359+
endif
360+
endif
361+
352362
else
353363
TESTDEP_$(1)_$(2)_$(3)_$(4) = $$(RSINPUTS_$(4))
354364
endif

branches/try2/src/compiletest/header.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ fn parse_compile_flags(line: &str) -> Option<~str> {
170170
}
171171

172172
fn parse_run_flags(line: &str) -> Option<~str> {
173-
parse_name_value_directive(line, ~"run-flags")
173+
parse_name_value_directive(line, "run-flags".to_owned())
174174
}
175175

176176
fn parse_debugger_cmd(line: &str) -> Option<~str> {
87.8 KB
Binary file not shown.
89.8 KB
Binary file not shown.
120 KB
Binary file not shown.
117 KB
Binary file not shown.
157 KB
Binary file not shown.

branches/try2/src/doc/complement-cheatsheet.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -207,12 +207,12 @@ let _ = close(Door::<Closed>("front".to_owned())); // error: mismatched types: e
207207
208208
## C function signature conversions
209209
210-
Description C signature Equivalent Rust signature
211-
---------------------- ---------------------------------------------- ------------------------------------------
212-
no parameters `void foo(void);` `fn foo();`
213-
return value `int foo(void);` `fn foo() -> c_int;`
214-
function parameters `void foo(int x, int y);` `fn foo(x: c_int, y: c_int);`
215-
in-out pointers `void foo(const int* in_ptr, int* out_ptr);` `fn foo(in_ptr: *c_int, out_ptr: *mut c_int);`
210+
| Description | C signature | Equivalent Rust signature |
211+
|---------------------|-----------------------------------------------|------------------------------------------------|
212+
| no parameters | `void foo(void);` | `fn foo();` |
213+
| return value | `int foo(void);` | `fn foo() -> c_int;` |
214+
| function parameters | `void foo(int x, int y);` | `fn foo(x: c_int, y: c_int);` |
215+
| in-out pointers | `void foo(const int* in_ptr, int* out_ptr);` | `fn foo(in_ptr: *c_int, out_ptr: *mut c_int);` |
216216
217217
Note: The Rust signatures should be wrapped in an `extern "ABI" { ... }` block.
218218

branches/try2/src/doc/complement-lang-faq.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ Some examples that demonstrate different aspects of the language:
2222

2323
[sprocketnes]: https://github.com/pcwalton/sprocketnes
2424
[hash]: https://github.com/mozilla/rust/blob/master/src/libstd/hash.rs
25-
[HashMap]: https://github.com/mozilla/rust/blob/master/src/libstd/hashmap.rs
26-
[json]: https://github.com/mozilla/rust/blob/master/src/libextra/json.rs
25+
[HashMap]: https://github.com/mozilla/rust/blob/master/src/libcollections/hashmap.rs
26+
[json]: https://github.com/mozilla/rust/blob/master/src/libserialize/json.rs
2727

2828
You may also be interested in browsing [GitHub's Rust][github-rust] page.
2929

branches/try2/src/doc/favicon.inc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
<link rel="shortcut icon" href="http://www.rust-lang.org/favicon.ico" />
1+
<link rel="shortcut icon" href="http://www.rust-lang.org/favicon.ico">
2+
<link href='http://fonts.googleapis.com/css?family=Source+Code+Pro:400'
3+
rel='stylesheet' type='text/css'>

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

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ just unique keys without a corresponding value. The `Map` and `Set` traits in
2222

2323
The standard library provides three owned map/set types:
2424

25-
* `std::hashmap::HashMap` and `std::hashmap::HashSet`, requiring the keys to
25+
* `collections::HashMap` and `collections::HashSet`, requiring the keys to
2626
implement `Eq` and `Hash`
27-
* `std::trie::TrieMap` and `std::trie::TrieSet`, requiring the keys to be `uint`
28-
* `extra::treemap::TreeMap` and `extra::treemap::TreeSet`, requiring the keys
27+
* `collections::TrieMap` and `collections::TrieSet`, requiring the keys to be `uint`
28+
* `collections::TreeMap` and `collections::TreeSet`, requiring the keys
2929
to implement `TotalOrd`
3030

3131
These maps do not use managed pointers so they can be sent between tasks as
@@ -42,19 +42,19 @@ implementing the `Hash` trait.
4242

4343
## Double-ended queues
4444

45-
The `extra::ringbuf` module implements a double-ended queue with `O(1)`
45+
The `collections::ringbuf` module implements a double-ended queue with `O(1)`
4646
amortized inserts and removals from both ends of the container. It also has
4747
`O(1)` indexing like a vector. The contained elements are not required to be
4848
copyable, and the queue will be sendable if the contained type is sendable.
49-
Its interface `Deque` is defined in `extra::collections`.
49+
Its interface `Deque` is defined in `collections`.
5050

5151
The `extra::dlist` module implements a double-ended linked list, also
5252
implementing the `Deque` trait, with `O(1)` removals and inserts at either end,
5353
and `O(1)` concatenation.
5454

5555
## Priority queues
5656

57-
The `extra::priority_queue` module implements a queue ordered by a key. The
57+
The `collections::priority_queue` module implements a queue ordered by a key. The
5858
contained elements are not required to be copyable, and the queue will be
5959
sendable if the contained type is sendable.
6060

@@ -120,12 +120,13 @@ differently.
120120
Containers implement iteration over the contained elements by returning an
121121
iterator object. For example, vector slices several iterators available:
122122
123-
* `iter()` and `rev_iter()`, for immutable references to the elements
124-
* `mut_iter()` and `mut_rev_iter()`, for mutable references to the elements
125-
* `move_iter()` and `move_rev_iter()`, to move the elements out by-value
123+
* `iter()` for immutable references to the elements
124+
* `mut_iter()` for mutable references to the elements
125+
* `move_iter()` to move the elements out by-value
126126
127127
A typical mutable container will implement at least `iter()`, `mut_iter()` and
128-
`move_iter()` along with the reverse variants if it maintains an order.
128+
`move_iter()`. If it maintains an order, the returned iterators will be
129+
`DoubleEndedIterator`s, which are described below.
129130
130131
### Freezing
131132
@@ -265,7 +266,7 @@ Iterators offer generic conversion to containers with the `collect` adaptor:
265266
266267
~~~
267268
let xs = [0, 1, 1, 2, 3, 5, 8];
268-
let ys = xs.rev_iter().skip(1).map(|&x| x * 2).collect::<~[int]>();
269+
let ys = xs.iter().rev().skip(1).map(|&x| x * 2).collect::<~[int]>();
269270
assert_eq!(ys, ~[10, 6, 4, 2, 2, 0]);
270271
~~~
271272
@@ -358,9 +359,6 @@ for &x in it.rev() {
358359
}
359360
~~~
360361

361-
The `rev_iter` and `mut_rev_iter` methods on vectors just return an inverted
362-
version of the standard immutable and mutable vector iterators.
363-
364362
The `chain`, `map`, `filter`, `filter_map` and `inspect` adaptors are
365363
`DoubleEndedIterator` implementations if the underlying iterators are.
366364

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ process is called *rooting*.
263263
The previous example demonstrated *rooting*, the process by which the
264264
compiler ensures that managed boxes remain live for the duration of a
265265
borrow. Unfortunately, rooting does not work for borrows of owned
266-
boxes, because it is not possible to have two references to a owned
266+
boxes, because it is not possible to have two references to an owned
267267
box.
268268

269269
For owned boxes, therefore, the compiler will only allow a borrow *if
@@ -462,7 +462,7 @@ of a `f64` as if it were a struct with two fields would be a memory
462462
safety violation.
463463

464464
So, in fact, for every `ref` binding, the compiler will impose the
465-
same rules as the ones we saw for borrowing the interior of a owned
465+
same rules as the ones we saw for borrowing the interior of an owned
466466
box: it must be able to guarantee that the `enum` will not be
467467
overwritten for the duration of the borrow. In fact, the compiler
468468
would accept the example we gave earlier. The example is safe because

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ enum List<T> {
186186
Nil,
187187
Cons(T, ~List<T>),
188188
}
189-
189+
190190
fn main() {
191191
let list: List<int> = Cons(1, ~Cons(2, ~Cons(3, ~Nil)));
192192
println!("{:?}", list);
@@ -251,7 +251,7 @@ struct.
251251

252252
> **Note**: the `@` form of managed pointers is deprecated and behind a
253253
> feature gate (it requires a `#![feature(managed_pointers)]` attribute on
254-
> the crate root; remember the semicolon!). There are replacements, currently
254+
> the crate root). There are replacements, currently
255255
> there is `std::rc::Rc` and `std::gc::Gc` for shared ownership via reference
256256
> counting and garbage collection respectively.
257257
@@ -266,7 +266,7 @@ struct Point {
266266
x: int,
267267
y: int,
268268
}
269-
269+
270270
fn main() {
271271
let a = ~Point { x: 10, y: 20 };
272272
let b = a;
@@ -297,7 +297,7 @@ struct Point {
297297
x: int,
298298
y: int,
299299
}
300-
300+
301301
fn main() {
302302
let a = @Point { x: 10, y: 20 };
303303
let b = a;
@@ -361,7 +361,7 @@ So how is this hard? Well, because we're ignoring ownership, the compiler needs
361361
to take great care to make sure that everything is safe. Despite their complete
362362
safety, a reference's representation at runtime is the same as that of
363363
an ordinary pointer in a C program. They introduce zero overhead. The compiler
364-
does all safety checks at compile time.
364+
does all safety checks at compile time.
365365

366366
This theory is called 'region pointers,' and involve a concept called
367367
'lifetimes'. Here's the simple explanation: would you expect this code to
@@ -477,7 +477,7 @@ fn main() {
477477
You may think that this gives us terrible performance: return a value and then
478478
immediately box it up?!?! Isn't that the worst of both worlds? Rust is smarter
479479
than that. There is no copy in this code. `main` allocates enough room for the
480-
`@int`, passes a pointer to that memory into `foo` as `x`, and then `foo` writes
480+
`@int`, passes a pointer to that memory into `foo` as `x`, and then `foo` writes
481481
the value straight into that pointer. This writes the return value directly into
482482
the allocated box.
483483

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

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,7 @@ concurrency at this writing:
4848
* [`std::task`] - All code relating to tasks and task scheduling,
4949
* [`std::comm`] - The message passing interface,
5050
* [`sync::DuplexStream`] - An extension of `pipes::stream` that allows both sending and receiving,
51-
* [`sync::SyncSender`] - An extension of `pipes::stream` that provides synchronous message sending,
52-
* [`sync::SyncReceiver`] - An extension of `pipes::stream` that acknowledges each message received,
53-
* [`sync::rendezvous`] - Creates a stream whose channel, upon sending a message, blocks until the
54-
message is received.
5551
* [`sync::Arc`] - The Arc (atomically reference counted) type, for safely sharing immutable data,
56-
* [`sync::RWArc`] - A dual-mode Arc protected by a reader-writer lock,
57-
* [`sync::MutexArc`] - An Arc with mutable data protected by a blocking mutex,
5852
* [`sync::Semaphore`] - A counting, blocking, bounded-waiting semaphore,
5953
* [`sync::Mutex`] - A blocking, bounded-waiting, mutual exclusion lock with an associated
6054
FIFO condition variable,
@@ -70,13 +64,8 @@ concurrency at this writing:
7064
[`std::task`]: std/task/index.html
7165
[`std::comm`]: std/comm/index.html
7266
[`sync::DuplexStream`]: sync/struct.DuplexStream.html
73-
[`sync::SyncSender`]: sync/struct.SyncSender.html
74-
[`sync::SyncReceiver`]: sync/struct.SyncReceiver.html
75-
[`sync::rendezvous`]: sync/fn.rendezvous.html
7667
[`sync::Arc`]: sync/struct.Arc.html
77-
[`sync::RWArc`]: sync/struct.RWArc.html
78-
[`sync::MutexArc`]: sync/struct.MutexArc.html
79-
[`sync::Semaphore`]: sync/struct.Semaphore.html
68+
[`sync::Semaphore`]: sync/raw/struct.Semaphore.html
8069
[`sync::Mutex`]: sync/struct.Mutex.html
8170
[`sync::RWLock`]: sync/struct.RWLock.html
8271
[`sync::Barrier`]: sync/struct.Barrier.html
@@ -100,7 +89,10 @@ closure in the new task.
10089
fn print_message() { println!("I am running in a different task!"); }
10190
spawn(print_message);
10291
103-
// Print something more profound in a different task using a lambda expression
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+
10496
spawn(proc() println!("I am also running in a different task!") );
10597
~~~~
10698

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ standard library types, e.g. `Cell` and `RefCell`, that provide inner
5656
mutability by replacing compile time guarantees with dynamic checks at
5757
runtime.
5858

59-
An `&mut` reference has a stronger requirement: when a object has an
59+
An `&mut` reference has a stronger requirement: when an object has an
6060
`&mut T` pointing into it, then that `&mut` reference must be the only
6161
such usable path to that object in the whole program. That is, an
6262
`&mut` cannot alias with any other references.

branches/try2/src/doc/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ fn main() {
370370
```
371371

372372
This example is starting to get more subtle,
373-
but it hints at the powerful compositionality of Rust's concurrent types.
373+
but it hints at the powerful composability of Rust's concurrent types.
374374
This time we've put our array of numbers inside a `Mutex` and then put *that* inside the `Arc`.
375375
Like immutable data,
376376
`Mutex`es are sharable,

0 commit comments

Comments
 (0)