Skip to content

Commit b982835

Browse files
committed
---
yaml --- r: 103116 b: refs/heads/auto c: d2f265d h: refs/heads/master v: v3
1 parent 0c39f25 commit b982835

File tree

43 files changed

+1361
-381
lines changed

Some content is hidden

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

43 files changed

+1361
-381
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 1ede49f49d381cd1b9b3d9394c1bc0f888e0025d
16+
refs/heads/auto: d2f265d195fd0559b8edfb71126785114de92117
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/Makefile.in

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,17 @@
1919
#
2020
# First, start with one of these build targets:
2121
#
22-
# * all - The default. Builds a complete, bootstrapped compiler.
22+
# * all - The default. Build a complete, bootstrapped compiler.
2323
# `rustc` will be in `${target-triple}/stage2/bin/`. Run it
2424
# directly from the build directory if you like. This also
2525
# comes with docs in `doc/`.
2626
#
2727
# * check - Run the complete test suite
2828
#
29+
# * clean - Clean the build repertory. It is advised to run this
30+
# command if you want to build Rust again, after an update
31+
# of the git repository.
32+
#
2933
# * install - Install Rust. Note that installation is not necessary
3034
# to use the compiler.
3135
#
@@ -103,7 +107,7 @@
103107
#
104108
# </tips>
105109
#
106-
# <nittygritty>
110+
# <nitty-gritty>
107111
#
108112
# # The Rust Build System
109113
#
@@ -152,12 +156,12 @@
152156
# libraries are managed and versioned without polluting the common
153157
# areas of the filesystem.
154158
#
155-
# General rust binaries may stil live in the host bin directory; they
159+
# General rust binaries may still live in the host bin directory; they
156160
# will just link against the libraries in the target lib directory.
157161
#
158162
# Admittedly this is a little convoluted.
159163
#
160-
# </nittygritty>
164+
# </nitty-gritty>
161165
#
162166

163167
######################################################################

branches/auto/mk/main.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -446,13 +446,13 @@ all: $(ALL_TARGET_RULES) $(GENERATED) docs
446446
# $(1) is the name of the doc <section> in Makefile.in
447447
# pick everything between tags | remove first line | remove last line
448448
# | remove extra (?) line | strip leading `#` from lines
449-
SHOW_DOCS = $(Q)awk '/$(1)/,/<\/$(1)>/' $(S)/Makefile.in | sed '1d' | sed '$$d' | sed 's/^\# \?//'
449+
SHOW_DOCS = $(Q)awk '/<$(1)>/,/<\/$(1)>/' $(S)/Makefile.in | sed '1d' | sed '$$d' | sed 's/^\# \?//'
450450

451451
help:
452452
$(call SHOW_DOCS,help)
453453

454-
hot-tips:
455-
$(call SHOW_DOCS,hottips)
454+
tips:
455+
$(call SHOW_DOCS,tips)
456456

457457
nitty-gritty:
458-
$(call SHOW_DOCS,nittygritty)
458+
$(call SHOW_DOCS,nitty-gritty)

branches/auto/src/compiler-rt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit d4606f1818dd8dfeaa3e509cd1cbac4482c3513e
1+
Subproject commit f4b221571ce6f05714c1f1c6fa48f1393499989c

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

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,7 @@ spawn(proc() {
226226
});
227227
~~~
228228

229-
Instead we can use a `SharedChan`, a type that allows a single
230-
`Chan` to be shared by multiple senders.
229+
Instead we can clone the `chan`, which allows for multiple senders.
231230

232231
~~~
233232
# use std::task::spawn;
@@ -246,16 +245,13 @@ let result = port.recv() + port.recv() + port.recv();
246245
# fn some_expensive_computation(_i: uint) -> int { 42 }
247246
~~~
248247

249-
Here we transfer ownership of the channel into a new `SharedChan` value. Like
250-
`Chan`, `SharedChan` is a non-copyable, owned type (sometimes also referred to
251-
as an *affine* or *linear* type). Unlike with `Chan`, though, the programmer
252-
may duplicate a `SharedChan`, with the `clone()` method. A cloned
253-
`SharedChan` produces a new handle to the same channel, allowing multiple
254-
tasks to send data to a single port. Between `spawn`, `Chan` and
255-
`SharedChan`, we have enough tools to implement many useful concurrency
256-
patterns.
248+
Cloning a `Chan` produces a new handle to the same channel, allowing multiple
249+
tasks to send data to a single port. It also upgrades the channel internally in
250+
order to allow this functionality, which means that channels that are not
251+
cloned can avoid the overhead required to handle multiple senders. But this
252+
fact has no bearing on the channel's usage: the upgrade is transparent.
257253

258-
Note that the above `SharedChan` example is somewhat contrived since
254+
Note that the above cloning example is somewhat contrived since
259255
you could also simply use three `Chan` pairs, but it serves to
260256
illustrate the point. For reference, written with multiple streams, it
261257
might look like the example below.

branches/auto/src/libextra/json.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ the code for these traits: `#[deriving(Decodable, Encodable)]`
5959
To encode using Encodable :
6060
6161
```rust
62+
extern crate extra;
6263
extern crate serialize;
6364
use extra::json;
6465
use std::io;
@@ -98,6 +99,7 @@ A basic `ToJson` example using a TreeMap of attribute name / attribute value:
9899
99100
100101
```rust
102+
extern crate extra;
101103
extern crate collections;
102104
103105
use extra::json;
@@ -125,9 +127,10 @@ fn main() {
125127
}
126128
```
127129
128-
To decode a json string using `Decodable` trait :
130+
To decode a JSON string using `Decodable` trait :
129131
130132
```rust
133+
extern crate extra;
131134
extern crate serialize;
132135
use serialize::Decodable;
133136
@@ -154,6 +157,7 @@ Create a struct called TestStruct1 and serialize and deserialize it to and from
154157
using the serialization API, using the derived serialization code.
155158
156159
```rust
160+
extern crate extra;
157161
extern crate serialize;
158162
use extra::json;
159163
use serialize::{Encodable, Decodable};
@@ -172,7 +176,7 @@ fn main() {
172176
{data_int: 1, data_str:~"toto", data_vector:~[2,3,4,5]};
173177
let encoded_str: ~str = json::Encoder::str_encode(&to_encode_object);
174178
175-
// To unserialize use the `extra::json::from_str` and `extra::json::Decoder`
179+
// To deserialize use the `extra::json::from_str` and `extra::json::Decoder`
176180
177181
let json_object = extra::json::from_str(encoded_str);
178182
let mut decoder = json::Decoder::new(json_object.unwrap());
@@ -182,10 +186,11 @@ fn main() {
182186
183187
## Using `ToJson`
184188
185-
This example use the ToJson impl to unserialize the json string.
189+
This example use the ToJson impl to deserialize the JSON string.
186190
Example of `ToJson` trait implementation for TestStruct1.
187191
188192
```rust
193+
extern crate extra;
189194
extern crate serialize;
190195
extern crate collections;
191196
@@ -212,13 +217,13 @@ impl ToJson for TestStruct1 {
212217
}
213218
214219
fn main() {
215-
// Seralization using our impl of to_json
220+
// Serialization using our impl of to_json
216221
217222
let test2: TestStruct1 = TestStruct1 {data_int: 1, data_str:~"toto", data_vector:~[2,3,4,5]};
218223
let tjson: json::Json = test2.to_json();
219224
let json_str: ~str = tjson.to_str();
220225
221-
// Unserialize like before.
226+
// Deserialize like before.
222227
223228
let mut decoder = json::Decoder::new(json::from_str(json_str).unwrap());
224229
// create the final object

branches/auto/src/libextra/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,7 @@ impl MetricMap {
11101110
11111111
// Benchmarking
11121112
1113-
/// A function that is opaque to the optimiser, to allow benchmarks to
1113+
/// A function that is opaque to the optimizer, to allow benchmarks to
11141114
/// pretend to use outputs to assist in avoiding dead-code
11151115
/// elimination.
11161116
///

branches/auto/src/libgreen/sched.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ pub struct Scheduler {
8686
/// A flag to tell the scheduler loop it needs to do some stealing
8787
/// in order to introduce randomness as part of a yield
8888
steal_for_yield: bool,
89-
/// Bookeeping for the number of tasks which are currently running around
89+
/// Bookkeeping for the number of tasks which are currently running around
9090
/// inside this pool of schedulers
9191
task_state: TaskState,
9292

branches/auto/src/libnative/io/file.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,9 @@ pub fn readdir(p: &CString) -> IoResult<~[Path]> {
571571
else {
572572
let fp_vec = vec::from_buf(
573573
fp_buf, wcslen(fp_buf) as uint);
574-
let fp_str = str::from_utf16(fp_vec);
574+
let fp_trimmed = str::truncate_utf16_at_nul(fp_vec);
575+
let fp_str = str::from_utf16(fp_trimmed)
576+
.expect("rust_list_dir_wfd_fp_buf returned invalid UTF-16");
575577
paths.push(Path::new(fp_str));
576578
}
577579
more_files = FindNextFileW(find_handle, wfd_ptr as HANDLE);

0 commit comments

Comments
 (0)