Skip to content

Commit 052a8f0

Browse files
committed
---
yaml --- r: 225241 b: refs/heads/stable c: 49597fc h: refs/heads/master i: 225239: 5557c0f v: v3
1 parent e381d83 commit 052a8f0

File tree

122 files changed

+659
-1617
lines changed

Some content is hidden

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

122 files changed

+659
-1617
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ refs/heads/tmp: e5d90d98402475b6e154ce216f9efcb80da1a747
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: 1fe32ca12c51afcd761d9962f51a74ff0d07a591
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 45001c0ef8a9a09f93e65d2d4d8d64364bb7d9ba
32+
refs/heads/stable: 49597fcbf26736ac2b2f7d6beab27f42a44bf306
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b

branches/stable/configure

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
msg() {
4-
echo "configure: $*"
4+
echo "configure: $1"
55
}
66

77
step_msg() {
@@ -33,8 +33,8 @@ need_ok() {
3333

3434
need_cmd() {
3535
if command -v $1 >/dev/null 2>&1
36-
then msg "found program '$1'"
37-
else err "program '$1' is missing, please install it"
36+
then msg "found program $1"
37+
else err "need program $1"
3838
fi
3939
}
4040

@@ -986,7 +986,7 @@ then
986986
| cut -d ' ' -f 2)
987987

988988
case $CFG_CLANG_VERSION in
989-
(3.2* | 3.3* | 3.4* | 3.5* | 3.6* | 3.7*)
989+
(3.2* | 3.3* | 3.4* | 3.5* | 3.6*)
990990
step_msg "found ok version of CLANG: $CFG_CLANG_VERSION"
991991
if [ -z "$CC" ]
992992
then

branches/stable/mk/cfg/i686-apple-darwin.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# i686-apple-darwin configuration
22
CC_i686-apple-darwin=$(CC)
3-
LINK_i686-apple-darwin=cc
43
CXX_i686-apple-darwin=$(CXX)
54
CPP_i686-apple-darwin=$(CPP)
65
AR_i686-apple-darwin=$(AR)

branches/stable/mk/cfg/i686-unknown-linux-gnu.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# i686-unknown-linux-gnu configuration
22
CC_i686-unknown-linux-gnu=$(CC)
3-
LINK_i686-unknown-linux-gnu=cc
43
CXX_i686-unknown-linux-gnu=$(CXX)
54
CPP_i686-unknown-linux-gnu=$(CPP)
65
AR_i686-unknown-linux-gnu=$(AR)

branches/stable/mk/cfg/x86_64-apple-darwin.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# x86_64-apple-darwin configuration
22
CC_x86_64-apple-darwin=$(CC)
3-
LINK_x86_64-apple-darwin=cc
43
CXX_x86_64-apple-darwin=$(CXX)
54
CPP_x86_64-apple-darwin=$(CPP)
65
AR_x86_64-apple-darwin=$(AR)

branches/stable/mk/cfg/x86_64-unknown-linux-gnu.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# x86_64-unknown-linux-gnu configuration
22
CC_x86_64-unknown-linux-gnu=$(CC)
3-
LINK_x86_64-unknown-linux-gnu=cc
43
CXX_x86_64-unknown-linux-gnu=$(CXX)
54
CPP_x86_64-unknown-linux-gnu=$(CPP)
65
AR_x86_64-unknown-linux-gnu=$(AR)

branches/stable/mk/dist.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ dist-install-dir-$(1): PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
123123
dist-install-dir-$(1): PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
124124
dist-install-dir-$(1): PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
125125
dist-install-dir-$(1): PREPARE_CLEAN=true
126-
dist-install-dir-$(1): prepare-base-dir-$(1) docs
126+
dist-install-dir-$(1): prepare-base-dir-$(1) docs compiler-docs
127127
$$(Q)mkdir -p $$(PREPARE_DEST_DIR)/share/doc/rust
128128
$$(Q)$$(PREPARE_MAN_CMD) $$(S)COPYRIGHT $$(PREPARE_DEST_DIR)/share/doc/rust
129129
$$(Q)$$(PREPARE_MAN_CMD) $$(S)LICENSE-APACHE $$(PREPARE_DEST_DIR)/share/doc/rust
@@ -163,7 +163,7 @@ endif
163163
--legacy-manifest-dirs=rustlib,cargo
164164
$$(Q)rm -R tmp/dist/$$(PKG_NAME)-$(1)-image
165165

166-
dist-doc-install-dir-$(1): docs
166+
dist-doc-install-dir-$(1): docs compiler-docs
167167
$$(Q)mkdir -p tmp/dist/$$(DOC_PKG_NAME)-$(1)-image/share/doc/rust
168168
$$(Q)cp -r doc tmp/dist/$$(DOC_PKG_NAME)-$(1)-image/share/doc/rust/html
169169

@@ -251,7 +251,7 @@ distcheck-tar-bins: dist-tar-bins
251251

252252
# Just copy the docs to a folder under dist with the appropriate name
253253
# for uploading to S3
254-
dist-docs: docs
254+
dist-docs: docs compiler-docs
255255
$(Q) rm -Rf dist/doc
256256
$(Q) mkdir -p dist/doc/
257257
$(Q) cp -r doc dist/doc/$(CFG_PACKAGE_VERS)

branches/stable/src/doc/reference.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2003,10 +2003,6 @@ arbitrarily complex configurations through nesting.
20032003

20042004
The following configurations must be defined by the implementation:
20052005

2006-
* `debug_assertions`. Enabled by default when compiling without optimizations.
2007-
This can be used to enable extra debugging code in development but not in
2008-
production. For example, it controls the behavior of the standard library's
2009-
`debug_assert!` macro.
20102006
* `target_arch = "..."`. Target CPU architecture, such as `"x86"`, `"x86_64"`
20112007
`"mips"`, `"powerpc"`, `"arm"`, or `"aarch64"`.
20122008
* `target_endian = "..."`. Endianness of the target CPU, either `"little"` or

branches/stable/src/doc/trpl/SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* [Learn Rust](learn-rust.md)
88
* [Guessing Game](guessing-game.md)
99
* [Dining Philosophers](dining-philosophers.md)
10-
* [Rust Inside Other Languages](rust-inside-other-languages.md)
10+
* [Rust inside other languages](rust-inside-other-languages.md)
1111
* [Effective Rust](effective-rust.md)
1212
* [The Stack and the Heap](the-stack-and-the-heap.md)
1313
* [Testing](testing.md)

branches/stable/src/doc/trpl/dining-philosophers.md

Lines changed: 42 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,26 @@
22

33
For our second project, let’s look at a classic concurrency problem. It’s
44
called ‘the dining philosophers’. It was originally conceived by Dijkstra in
5-
1965, but we’ll use a lightly adapted version from [this paper][paper] by Tony
6-
Hoare in 1985.
5+
1965, but we’ll use the version from [this paper][paper] by Tony Hoare in 1985.
76

87
[paper]: http://www.usingcsp.com/cspbook.pdf
98

109
> In ancient times, a wealthy philanthropist endowed a College to accommodate
11-
> five eminent philosophers. Each philosopher had a room in which they could
12-
> engage in their professional activity of thinking; there was also a common
10+
> five eminent philosophers. Each philosopher had a room in which she could
11+
> engage in her professional activity of thinking; there was also a common
1312
> dining room, furnished with a circular table, surrounded by five chairs, each
1413
> labelled by the name of the philosopher who was to sit in it. They sat
1514
> anticlockwise around the table. To the left of each philosopher there was
1615
> laid a golden fork, and in the centre stood a large bowl of spaghetti, which
17-
> was constantly replenished. A philosopher was expected to spend most of
18-
> their time thinking; but when they felt hungry, they went to the dining
19-
> room, sat down in their own chair, picked up their own fork on their left,
20-
> and plunged it into the spaghetti. But such is the tangled nature of
21-
> spaghetti that a second fork is required to carry it to the mouth. The
22-
> philosopher therefore had also to pick up the fork on their right. When
23-
> they were finished they would put down both their forks, get up from their
24-
> chair, and continue thinking. Of course, a fork can be used by only one
25-
> philosopher at a time. If the other philosopher wants it, they just have
26-
> to wait until the fork is available again.
16+
> was constantly replenished. A philosopher was expected to spend most of her
17+
> time thinking; but when she felt hungry, she went to the dining room, sat down
18+
> in her own chair, picked up her own fork on her left, and plunged it into the
19+
> spaghetti. But such is the tangled nature of spaghetti that a second fork is
20+
> required to carry it to the mouth. The philosopher therefore had also to pick
21+
> up the fork on her right. When she was finished she would put down both her
22+
> forks, get up from her chair, and continue thinking. Of course, a fork can be
23+
> used by only one philosopher at a time. If the other philosopher wants it, she
24+
> just has to wait until the fork is available again.
2725
2826
This classic problem shows off a few different elements of concurrency. The
2927
reason is that it's actually slightly tricky to implement: a simple
@@ -62,10 +60,10 @@ impl Philosopher {
6260
}
6361

6462
fn main() {
65-
let p1 = Philosopher::new("Judith Butler");
63+
let p1 = Philosopher::new("Baruch Spinoza");
6664
let p2 = Philosopher::new("Gilles Deleuze");
6765
let p3 = Philosopher::new("Karl Marx");
68-
let p4 = Philosopher::new("Emma Goldman");
66+
let p4 = Philosopher::new("Friedrich Nietzsche");
6967
let p5 = Philosopher::new("Michel Foucault");
7068
}
7169
```
@@ -161,10 +159,10 @@ look at `main()` again:
161159
# }
162160
#
163161
fn main() {
164-
let p1 = Philosopher::new("Judith Butler");
162+
let p1 = Philosopher::new("Baruch Spinoza");
165163
let p2 = Philosopher::new("Gilles Deleuze");
166164
let p3 = Philosopher::new("Karl Marx");
167-
let p4 = Philosopher::new("Emma Goldman");
165+
let p4 = Philosopher::new("Friedrich Nietzsche");
168166
let p5 = Philosopher::new("Michel Foucault");
169167
}
170168
```
@@ -178,10 +176,10 @@ that `new()` function, it would look like this:
178176
# name: String,
179177
# }
180178
fn main() {
181-
let p1 = Philosopher { name: "Judith Butler".to_string() };
179+
let p1 = Philosopher { name: "Baruch Spinoza".to_string() };
182180
let p2 = Philosopher { name: "Gilles Deleuze".to_string() };
183181
let p3 = Philosopher { name: "Karl Marx".to_string() };
184-
let p4 = Philosopher { name: "Emma Goldman".to_string() };
182+
let p4 = Philosopher { name: "Friedrich Nietzche".to_string() };
185183
let p5 = Philosopher { name: "Michel Foucault".to_string() };
186184
}
187185
```
@@ -213,10 +211,10 @@ impl Philosopher {
213211

214212
fn main() {
215213
let philosophers = vec![
216-
Philosopher::new("Judith Butler"),
214+
Philosopher::new("Baruch Spinoza"),
217215
Philosopher::new("Gilles Deleuze"),
218216
Philosopher::new("Karl Marx"),
219-
Philosopher::new("Emma Goldman"),
217+
Philosopher::new("Friedrich Nietzsche"),
220218
Philosopher::new("Michel Foucault"),
221219
];
222220

@@ -249,10 +247,10 @@ mention they’re done eating. Running this program should give you the followin
249247
output:
250248

251249
```text
252-
Judith Butler is done eating.
250+
Baruch Spinoza is done eating.
253251
Gilles Deleuze is done eating.
254252
Karl Marx is done eating.
255-
Emma Goldman is done eating.
253+
Friedrich Nietzsche is done eating.
256254
Michel Foucault is done eating.
257255
```
258256

@@ -287,10 +285,10 @@ impl Philosopher {
287285

288286
fn main() {
289287
let philosophers = vec![
290-
Philosopher::new("Judith Butler"),
288+
Philosopher::new("Baruch Spinoza"),
291289
Philosopher::new("Gilles Deleuze"),
292290
Philosopher::new("Karl Marx"),
293-
Philosopher::new("Emma Goldman"),
291+
Philosopher::new("Friedrich Nietzsche"),
294292
Philosopher::new("Michel Foucault"),
295293
];
296294

@@ -325,14 +323,14 @@ simulate the time it takes a philosopher to eat.
325323
If you run this program, you should see each philosopher eat in turn:
326324

327325
```text
328-
Judith Butler is eating.
329-
Judith Butler is done eating.
326+
Baruch Spinoza is eating.
327+
Baruch Spinoza is done eating.
330328
Gilles Deleuze is eating.
331329
Gilles Deleuze is done eating.
332330
Karl Marx is eating.
333331
Karl Marx is done eating.
334-
Emma Goldman is eating.
335-
Emma Goldman is done eating.
332+
Friedrich Nietzsche is eating.
333+
Friedrich Nietzsche is done eating.
336334
Michel Foucault is eating.
337335
Michel Foucault is done eating.
338336
```
@@ -368,10 +366,10 @@ impl Philosopher {
368366

369367
fn main() {
370368
let philosophers = vec![
371-
Philosopher::new("Judith Butler"),
369+
Philosopher::new("Baruch Spinoza"),
372370
Philosopher::new("Gilles Deleuze"),
373371
Philosopher::new("Karl Marx"),
374-
Philosopher::new("Emma Goldman"),
372+
Philosopher::new("Friedrich Nietzsche"),
375373
Philosopher::new("Michel Foucault"),
376374
];
377375

@@ -460,11 +458,11 @@ We have multi-threading!
460458
```text
461459
Gilles Deleuze is eating.
462460
Gilles Deleuze is done eating.
463-
Emma Goldman is eating.
464-
Emma Goldman is done eating.
461+
Friedrich Nietzsche is eating.
462+
Friedrich Nietzsche is done eating.
465463
Michel Foucault is eating.
466-
Judith Butler is eating.
467-
Judith Butler is done eating.
464+
Baruch Spinoza is eating.
465+
Baruch Spinoza is done eating.
468466
Karl Marx is eating.
469467
Karl Marx is done eating.
470468
Michel Foucault is done eating.
@@ -534,10 +532,10 @@ fn main() {
534532
]});
535533

536534
let philosophers = vec![
537-
Philosopher::new("Judith Butler", 0, 1),
535+
Philosopher::new("Baruch Spinoza", 0, 1),
538536
Philosopher::new("Gilles Deleuze", 1, 2),
539537
Philosopher::new("Karl Marx", 2, 3),
540-
Philosopher::new("Emma Goldman", 3, 4),
538+
Philosopher::new("Friedrich Nietzsche", 3, 4),
541539
Philosopher::new("Michel Foucault", 0, 4),
542540
];
543541

@@ -645,10 +643,10 @@ count will go up, and when each thread ends, it will go back down.
645643

646644
```rust,ignore
647645
let philosophers = vec![
648-
Philosopher::new("Judith Butler", 0, 1),
646+
Philosopher::new("Baruch Spinoza", 0, 1),
649647
Philosopher::new("Gilles Deleuze", 1, 2),
650648
Philosopher::new("Karl Marx", 2, 3),
651-
Philosopher::new("Emma Goldman", 3, 4),
649+
Philosopher::new("Friedrich Nietzsche", 3, 4),
652650
Philosopher::new("Michel Foucault", 0, 4),
653651
];
654652
```
@@ -681,12 +679,12 @@ and so you’ll get some output like this:
681679

682680
```text
683681
Gilles Deleuze is eating.
684-
Emma Goldman is eating.
685-
Emma Goldman is done eating.
682+
Friedrich Nietzsche is eating.
683+
Friedrich Nietzsche is done eating.
686684
Gilles Deleuze is done eating.
687-
Judith Butler is eating.
685+
Baruch Spinoza is eating.
688686
Karl Marx is eating.
689-
Judith Butler is done eating.
687+
Baruch Spinoza is done eating.
690688
Michel Foucault is eating.
691689
Karl Marx is done eating.
692690
Michel Foucault is done eating.

branches/stable/src/doc/trpl/guessing-game.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ When we wrote `let guess = String::new()`, Rust was able to infer that `guess`
637637
should be a `String`, and so it doesn’t make us write out the type. And with
638638
our `secret_number`, there are a number of types which can have a value
639639
between one and a hundred: `i32`, a thirty-two-bit number, or `u32`, an
640-
unsigned thirty-two-bit number, or `i64`, a sixty-four-bit number or others.
640+
unsigned thirty-two-bit number, or `i64`, a sixty-four-bit number. Or others.
641641
So far, that hasn’t mattered, and so Rust defaults to an `i32`. However, here,
642642
Rust doesn’t know how to compare the `guess` and the `secret_number`. They
643643
need to be the same type. Ultimately, we want to convert the `String` we

0 commit comments

Comments
 (0)