Skip to content

Commit 0f89284

Browse files
committed
---
yaml --- r: 174142 b: refs/heads/batch c: 7be39b0 h: refs/heads/master v: v3
1 parent e622cae commit 0f89284

File tree

167 files changed

+2940
-1661
lines changed

Some content is hidden

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

167 files changed

+2940
-1661
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2929
refs/heads/issue-18208-method-dispatch-2: 9e1eae4fb9b6527315b4441cf8a0f5ca911d1671
3030
refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
32-
refs/heads/batch: 5e646755f4c5fc7ccdbb6b40d61010f2b1c25fe5
32+
refs/heads/batch: 7be39b0c0339bff6bc3809b910fc6a0a106a5893
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: 44a287e6eb22ec3c2a687fc156813577464017f7
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928

branches/batch/AUTHORS.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ Robert Knight <[email protected]>
581581
Robert Millar <[email protected]>
582582
Robin Gloster <[email protected]>
583583
Robin Stocker <[email protected]>
584-
Rohit Joshi <rohit.joshi@capitalone.com>
584+
Rohit Joshi <rohit.c.joshi@gmail.com>
585585
Roland Tanglao <[email protected]>
586586
Rolf Timmermans <[email protected]>
587587
Rolf van de Krol <[email protected]>

branches/batch/Makefile.in

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,9 @@
9797
# make check-stage1-std RUST_TEST_TASKS=1
9898
#
9999
# This is hardly all there is to know of The Rust Build System's
100-
# mysteries. The tale continues on the wiki[1][2].
100+
# mysteries. The tale continues on the wiki[1].
101101
#
102-
# [1]: https://github.com/rust-lang/rust/wiki/Note-getting-started-developing-Rust
103-
# [2]: https://github.com/rust-lang/rust/wiki/Note-testsuite
102+
# [1]: https://github.com/rust-lang/rust/wiki/Note-testsuite
104103
#
105104
# If you really feel like getting your hands dirty, then:
106105
#

branches/batch/README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,23 @@ documentation.
5858

5959
### Building on Windows
6060

61-
To easily build on windows we can use [MSYS2](http://sourceforge.net/projects/msys2/):
61+
To easily build on windows we can use [MSYS2](http://msys2.github.io/):
6262

6363
1. Grab the latest MSYS2 installer and go through the installer.
6464
2. Now from the MSYS2 terminal we want to install the mingw64 toolchain and the other
6565
tools we need.
6666

67-
$ pacman -S mingw-w64-i686-toolchain
68-
$ pacman -S base-devel
67+
```bash
68+
# choose one based on platform
69+
$ pacman -S mingw-w64-i686-toolchain
70+
$ pacman -S mingw-w64-x86_64-toolchain
6971

70-
3. With that now start `mingw32_shell.bat` from where you installed MSYS2 (i.e. `C:\msys`).
72+
$ pacman -S base-devel
73+
```
74+
75+
3. With that now start `mingw32_shell.bat` or `mingw64_shell.bat`
76+
from where you installed MSYS2 (i.e. `C:\msys`). Which one you
77+
choose depends on if you want 32 or 64 bit Rust.
7178
4. From there just navigate to where you have Rust's source code, configure and build it:
7279

7380
$ ./configure

branches/batch/configure

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,10 @@ case $CFG_CPUTYPE in
448448
CFG_CPUTYPE=aarch64
449449
;;
450450

451+
powerpc)
452+
CFG_CPUTYPE=powerpc
453+
;;
454+
451455
x86_64 | x86-64 | x64 | amd64)
452456
CFG_CPUTYPE=x86_64
453457
;;
@@ -1004,7 +1008,7 @@ do
10041008
make_dir $t/rt/jemalloc
10051009
for i in \
10061010
isaac sync test \
1007-
arch/i386 arch/x86_64 arch/arm arch/aarch64 arch/mips
1011+
arch/i386 arch/x86_64 arch/arm arch/aarch64 arch/mips arch/powerpc
10081012
do
10091013
make_dir $t/rt/stage$s/$i
10101014
done
@@ -1169,7 +1173,7 @@ do
11691173

11701174
msg "configuring LLVM for $gnu_t"
11711175

1172-
LLVM_TARGETS="--enable-targets=x86,x86_64,arm,aarch64,mips"
1176+
LLVM_TARGETS="--enable-targets=x86,x86_64,arm,aarch64,mips,powerpc"
11731177
LLVM_BUILD="--build=$gnu_t"
11741178
LLVM_HOST="--host=$gnu_t"
11751179
LLVM_TARGET="--target=$gnu_t"

branches/batch/mk/cfg/aarch64-apple-ios.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ AR_aarch64-apple-ios = $(shell xcrun -find -sdk iphoneos ar)
1111
endif
1212
CFG_LIB_NAME_aarch64-apple-ios = lib$(1).a
1313
CFG_LIB_GLOB_aarch64-apple-ios = lib$(1)-*.a
14-
CFG_LIB_SKIP_INSTALL_aarch64-apple-ios = 1 #lib$(1)-*.a
14+
CFG_INSTALL_ONLY_RLIB_aarch64-apple-ios = 1
1515
CFG_STATIC_LIB_NAME_aarch64-apple-ios=lib$(1).a
1616
CFG_LIB_DSYM_GLOB_aarch64-apple-ios = lib$(1)-*.a.dSYM
1717
CFG_CFLAGS_aarch64-apple-ios := $(CFG_IOS_SDK_FLAGS_aarch64-apple-ios)

branches/batch/mk/cfg/armv7-apple-ios.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ AR_armv7-apple-ios = $(shell xcrun -find -sdk iphoneos ar)
1111
endif
1212
CFG_LIB_NAME_armv7-apple-ios = lib$(1).a
1313
CFG_LIB_GLOB_armv7-apple-ios = lib$(1)-*.a
14-
CFG_LIB_SKIP_INSTALL_armv7-apple-ios = 1 #lib$(1)-*.a
14+
CFG_INSTALL_ONLY_RLIB_armv7-apple-ios = 1
1515
CFG_STATIC_LIB_NAME_armv7-apple-ios=lib$(1).a
1616
CFG_LIB_DSYM_GLOB_armv7-apple-ios = lib$(1)-*.a.dSYM
1717
CFG_JEMALLOC_CFLAGS_armv7-apple-ios := -arch armv7 -mfpu=vfp3 $(CFG_IOS_SDK_FLAGS_armv7-apple-ios)

branches/batch/mk/cfg/armv7s-apple-ios.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ AR_armv7s-apple-ios = $(shell xcrun -find -sdk iphoneos ar)
1111
endif
1212
CFG_LIB_NAME_armv7s-apple-ios = lib$(1).a
1313
CFG_LIB_GLOB_armv7s-apple-ios = lib$(1)-*.a
14-
CFG_LIB_SKIP_INSTALL_armv7s-apple-ios = 1 #lib$(1)-*.a
14+
CFG_INSTALL_ONLY_RLIB_armv7s-apple-ios = 1
1515
CFG_STATIC_LIB_NAME_armv7s-apple-ios=lib$(1).a
1616
CFG_LIB_DSYM_GLOB_armv7s-apple-ios = lib$(1)-*.a.dSYM
1717
CFG_JEMALLOC_CFLAGS_armv7s-apple-ios := -arch armv7s -mfpu=vfp4 $(CFG_IOS_SDK_FLAGS_armv7s-apple-ios)

branches/batch/mk/cfg/i386-apple-ios.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ AR_i386-apple-ios = $(shell xcrun -find -sdk iphonesimulator ar)
1111
endif
1212
CFG_LIB_NAME_i386-apple-ios = lib$(1).a
1313
CFG_LIB_GLOB_i386-apple-ios = lib$(1)-*.dylib
14+
CFG_INSTALL_ONLY_RLIB_i386-apple-ios = 1
1415
CFG_STATIC_LIB_NAME_i386-apple-ios=lib$(1).a
1516
CFG_LIB_DSYM_GLOB_i386-apple-ios = lib$(1)-*.dylib.dSYM
1617
CFG_GCCISH_CFLAGS_i386-apple-ios := -Wall -Werror -g -fPIC -m32 $(CFG_IOSSIM_FLAGS_i386-apple-ios)
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# powerpc-unknown-linux-gnu configuration
2+
CROSS_PREFIX_powerpc-unknown-linux-gnu=powerpc-linux-gnu-
3+
CC_powerpc-unknown-linux-gnu=$(CC)
4+
CXX_powerpc-unknown-linux-gnu=$(CXX)
5+
CPP_powerpc-unknown-linux-gnu=$(CPP)
6+
AR_powerpc-unknown-linux-gnu=$(AR)
7+
CFG_LIB_NAME_powerpc-unknown-linux-gnu=lib$(1).so
8+
CFG_STATIC_LIB_NAME_powerpc-unknown-linux-gnu=lib$(1).a
9+
CFG_LIB_GLOB_powerpc-unknown-linux-gnu=lib$(1)-*.so
10+
CFG_LIB_DSYM_GLOB_powerpc-unknown-linux-gnu=lib$(1)-*.dylib.dSYM
11+
CFG_CFLAGS_powerpc-unknown-linux-gnu := -m32 $(CFLAGS)
12+
CFG_GCCISH_CFLAGS_powerpc-unknown-linux-gnu := -Wall -Werror -g -fPIC -m32 $(CFLAGS)
13+
CFG_GCCISH_CXXFLAGS_powerpc-unknown-linux-gnu := -fno-rtti $(CXXFLAGS)
14+
CFG_GCCISH_LINK_FLAGS_powerpc-unknown-linux-gnu := -shared -fPIC -ldl -pthread -lrt -g -m32
15+
CFG_GCCISH_DEF_FLAG_powerpc-unknown-linux-gnu := -Wl,--export-dynamic,--dynamic-list=
16+
CFG_GCCISH_PRE_LIB_FLAGS_powerpc-unknown-linux-gnu := -Wl,-whole-archive
17+
CFG_GCCISH_POST_LIB_FLAGS_powerpc-unknown-linux-gnu := -Wl,-no-whole-archive
18+
CFG_DEF_SUFFIX_powerpc-unknown-linux-gnu := .linux.def
19+
CFG_LLC_FLAGS_powerpc-unknown-linux-gnu :=
20+
CFG_INSTALL_NAME_powerpc-unknown-linux-gnu =
21+
CFG_EXE_SUFFIX_powerpc-unknown-linux-gnu =
22+
CFG_WINDOWSY_powerpc-unknown-linux-gnu :=
23+
CFG_UNIXY_powerpc-unknown-linux-gnu := 1
24+
CFG_PATH_MUNGE_powerpc-unknown-linux-gnu := true
25+
CFG_LDPATH_powerpc-unknown-linux-gnu :=
26+
CFG_RUN_powerpc-unknown-linux-gnu=$(2)
27+
CFG_RUN_TARG_powerpc-unknown-linux-gnu=$(call CFG_RUN_powerpc-unknown-linux-gnu,,$(2))
28+
CFG_GNU_TRIPLE_powerpc-unknown-linux-gnu := powerpc-unknown-linux-gnu

branches/batch/mk/cfg/x86_64-apple-ios.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ AR_x86_64-apple-ios = $(shell xcrun -find -sdk iphonesimulator ar)
1111
endif
1212
CFG_LIB_NAME_x86_64-apple-ios = lib$(1).a
1313
CFG_LIB_GLOB_x86_64-apple-ios = lib$(1)-*.a
14-
CFG_LIB_SKIP_INSTALL_x86_64-apple-ios = 1 #lib$(1)-*.a
14+
CFG_INSTALL_ONLY_RLIB_x86_64-apple-ios = 1
1515
CFG_STATIC_LIB_NAME_x86_64-apple-ios=lib$(1).a
1616
CFG_LIB_DSYM_GLOB_x86_64-apple-ios = lib$(1)-*.a.dSYM
1717
CFG_CFLAGS_x86_64-apple-ios := $(CFG_IOSSIM_FLAGS_x86_64-apple-ios)

branches/batch/mk/main.mk

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ CFG_RELEASE_NUM=1.0.0
1818
# An optional number to put after the label, e.g. '.2' -> '-beta.2'
1919
# NB Make sure it starts with a dot to conform to semver pre-release
2020
# versions (section 9)
21-
CFG_PRERELEASE_VERSION=
21+
CFG_PRERELEASE_VERSION=.1
2222

2323
CFG_FILENAME_EXTRA=4e7c5e5c
2424

@@ -30,9 +30,8 @@ CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)
3030
CFG_DISABLE_UNSTABLE_FEATURES=1
3131
endif
3232
ifeq ($(CFG_RELEASE_CHANNEL),beta)
33-
# The beta channel is temporarily called 'alpha'
34-
CFG_RELEASE=$(CFG_RELEASE_NUM)-alpha$(CFG_PRERELEASE_VERSION)
35-
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)-alpha$(CFG_PRERELEASE_VERSION)
33+
CFG_RELEASE=$(CFG_RELEASE_NUM)-beta(CFG_PRERELEASE_VERSION)
34+
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)-beta(CFG_PRERELEASE_VERSION)
3635
CFG_DISABLE_UNSTABLE_FEATURES=1
3736
endif
3837
ifeq ($(CFG_RELEASE_CHANNEL),nightly)
@@ -263,7 +262,7 @@ endif
263262
######################################################################
264263

265264
# FIXME: x86-ism
266-
LLVM_COMPONENTS=x86 arm aarch64 mips ipo bitreader bitwriter linker asmparser mcjit \
265+
LLVM_COMPONENTS=x86 arm aarch64 mips powerpc ipo bitreader bitwriter linker asmparser mcjit \
267266
interpreter instrumentation
268267

269268
# Only build these LLVM tools

branches/batch/mk/platform.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ define CFG_MAKE_TOOLCHAIN
177177
$$(CFG_GCCISH_DEF_FLAG_$(1))$$(3) $$(2) \
178178
$$(call CFG_INSTALL_NAME_$(1),$$(4))
179179

180-
ifeq ($$(findstring $(HOST_$(1)),arm aarch64 mips mipsel),)
180+
ifeq ($$(findstring $(HOST_$(1)),arm aarch64 mips mipsel powerpc),)
181181

182182
# We're using llvm-mc as our assembler because it supports
183183
# .cfi pseudo-ops on mac
@@ -189,7 +189,7 @@ define CFG_MAKE_TOOLCHAIN
189189
-o=$$(1)
190190
else
191191

192-
# For the ARM, AARCH64 and MIPS crosses, use the toolchain assembler
192+
# For the ARM, AARCH64, MIPS and POWER crosses, use the toolchain assembler
193193
# FIXME: We should be able to use the LLVM assembler
194194
CFG_ASSEMBLE_$(1)=$$(CC_$(1)) $$(CFG_GCCISH_CFLAGS_$(1)) \
195195
$$(CFG_DEPEND_FLAGS) $$(2) -c -o $$(1)

branches/batch/mk/prepare.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ prepare-target-$(2)-host-$(3)-$(1)-$(4): prepare-maybe-clean-$(4) \
134134
$$(if $$(findstring $(3), $$(PREPARE_HOST)), \
135135
$$(call PREPARE_DIR,$$(PREPARE_WORKING_DEST_LIB_DIR)) \
136136
$$(foreach crate,$$(TARGET_CRATES), \
137-
$$(if $$(findstring 1, $$(ONLY_RLIB_$$(crate))),, \
137+
$$(if $$(or $$(findstring 1, $$(ONLY_RLIB_$$(crate))),$$(findstring 1,$$(CFG_INSTALL_ONLY_RLIB_$(2)))),, \
138138
$$(call PREPARE_LIB,$$(call CFG_LIB_GLOB_$(2),$$(crate)))) \
139139
$$(call PREPARE_LIB,$$(call CFG_RLIB_GLOB,$$(crate)))) \
140140
$$(if $$(findstring $(2),$$(CFG_HOST)), \

branches/batch/src/doc/intro.md

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ accomplishes these goals by being memory safe without using garbage collection.
55

66
This introduction will give you a rough idea of what Rust is like, eliding many
77
details. It does not require prior experience with systems programming, but you
8-
may find the syntax easier if you've used a 'curly brace' programming language
8+
may find the syntax easier if you've used a "curly brace" programming language
99
before, like C or JavaScript. The concepts are more important than the syntax,
1010
so don't worry if you don't get every last detail: you can read [The
1111
Rust Programming Language](book/index.html) to get a more complete explanation.
@@ -15,7 +15,7 @@ Rust to follow along. If you'd like to anyway, check out [the
1515
homepage](http://rust-lang.org) for explanation.
1616

1717
To show off Rust, let's talk about how easy it is to get started with Rust.
18-
Then, we'll talk about Rust's most interesting feature, **ownership**, and
18+
Then, we'll talk about Rust's most interesting feature, *ownership*, and
1919
then discuss how it makes concurrency easier to reason about. Finally,
2020
we'll talk about how Rust breaks down the perceived dichotomy between speed
2121
and safety.
@@ -57,7 +57,7 @@ version = "0.0.1"
5757
authors = ["Your Name <[email protected]>"]
5858
```
5959

60-
This is called a **manifest**, and it contains all of the metadata that Cargo
60+
This is called a *manifest*, and it contains all of the metadata that Cargo
6161
needs to compile your project.
6262

6363
Here's what's in `src/main.rs`:
@@ -68,7 +68,7 @@ fn main() {
6868
}
6969
```
7070

71-
Cargo generated a 'hello world' for us. We'll talk more about the syntax here
71+
Cargo generated a "Hello World" for us. We'll talk more about the syntax here
7272
later, but that's what Rust code looks like! Let's compile and run it:
7373

7474
```{bash}
@@ -146,8 +146,8 @@ Enough about tools, let's talk code!
146146

147147
# Ownership
148148

149-
Rust's defining feature is 'memory safety without garbage collection.' Let's
150-
take a moment to talk about what that means. **Memory safety** means that the
149+
Rust's defining feature is "memory safety without garbage collection". Let's
150+
take a moment to talk about what that means. *Memory safety* means that the
151151
programming language eliminates certain kinds of bugs, such as [buffer
152152
overflows](http://en.wikipedia.org/wiki/Buffer_overflow) and [dangling
153153
pointers](http://en.wikipedia.org/wiki/Dangling_pointer). These problems occur
@@ -170,7 +170,7 @@ We make an array, `v`, and then call `push` on it. `push` is a method which
170170
adds an element to the end of an array.
171171

172172
Next, we make a new variable, `x`, that's equal to the first element of
173-
the array. Simple, but this is where the 'bug' will appear.
173+
the array. Simple, but this is where the "bug" will appear.
174174

175175
Let's keep going. We then call `push` again, pushing "world" onto the
176176
end of the array. `v` now is `["Hello", "world"]`.
@@ -222,7 +222,7 @@ its length changes, we may need to allocate more memory. In Ruby, this happens
222222
as well, we just don't think about it very often. So why does the C++ version
223223
segfault when we allocate more memory?
224224

225-
The answer is that in the C++ version, `x` is a **reference** to the memory
225+
The answer is that in the C++ version, `x` is a *reference* to the memory
226226
location where the first element of the array is stored. But in Ruby, `x` is a
227227
standalone value, not connected to the underyling array at all. Let's dig into
228228
the details for a moment. Your program has access to memory, provided to it by
@@ -332,11 +332,11 @@ error: aborting due to previous error
332332
333333
When we try to mutate the array by `push`ing it the second time, Rust throws
334334
an error. It says that we "cannot borrow v as mutable because it is also
335-
borrowed as immutable." What's up with "borrowed"?
335+
borrowed as immutable." What does it mean by "borrowed"?
336336
337-
In Rust, the type system encodes the notion of **ownership**. The variable `v`
338-
is an "owner" of the vector. When we make a reference to `v`, we let that
339-
variable (in this case, `x`) 'borrow' it for a while. Just like if you own a
337+
In Rust, the type system encodes the notion of *ownership*. The variable `v`
338+
is an *owner* of the vector. When we make a reference to `v`, we let that
339+
variable (in this case, `x`) *borrow* it for a while. Just like if you own a
340340
book, and you lend it to me, I'm borrowing the book.
341341
342342
So, when I try to modify the vector with the second call to `push`, I need
@@ -392,22 +392,23 @@ Here's an example of a concurrent Rust program:
392392
use std::thread::Thread;
393393
394394
fn main() {
395-
for _ in range(0u, 10u) {
396-
Thread::spawn(move || {
395+
let guards: Vec<_> = (0..10).map(|_| {
396+
Thread::scoped(|| {
397397
println!("Hello, world!");
398-
});
399-
}
398+
})
399+
}).collect();
400400
}
401401
```
402402
403-
This program creates ten threads, who all print `Hello, world!`. The
404-
`spawn` function takes one argument, a closure, indicated by the
405-
double bars `||`. (The `move` keyword indicates that the closure takes
406-
ownership of any data it uses; we'll have more on the significance of
407-
this shortly.) This closure is executed in a new thread created by
408-
`spawn`.
403+
This program creates ten threads, which all print `Hello, world!`. The `scoped`
404+
function takes one argument, a closure, indicated by the double bars `||`. This
405+
closure is executed in a new thread created by `scoped`. The method is called
406+
`scoped` because it returns a 'join guard', which will automatically join the
407+
child thread when it goes out of scope. Because we `collect` these guards into
408+
a `Vec<T>`, and that vector goes out of scope at the end of our program, our
409+
program will wait for every thread to finish before finishing.
409410
410-
One common form of problem in concurrent programs is a 'data race.'
411+
One common form of problem in concurrent programs is a *data race*.
411412
This occurs when two different threads attempt to access the same
412413
location in memory in a non-synchronized way, where at least one of
413414
them is a write. If one thread is attempting to read, and one thread
@@ -460,9 +461,9 @@ code tries to make three owners. This may cause a safety problem, so
460461
Rust disallows it.
461462
462463
What to do here? Rust has two types that helps us: `Arc<T>` and `Mutex<T>`.
463-
"Arc" stands for "atomically reference counted." In other words, an Arc will
464+
*Arc* stands for "atomically reference counted". In other words, an Arc will
464465
keep track of the number of references to something, and not free the
465-
associated resource until the count is zero. The 'atomic' portion refers to an
466+
associated resource until the count is zero. The *atomic* portion refers to an
466467
Arc's usage of concurrency primitives to atomically update the count, making it
467468
safe across threads. If we use an Arc, we can have our three references. But,
468469
an Arc does not allow mutable borrows of the data it holds, and we want to
@@ -525,13 +526,13 @@ give us assurance _at compile time_ that we weren't doing something incorrect
525526
with regards to concurrency. In order to share ownership, we were forced to be
526527
explicit and use a mechanism to ensure that it would be properly handled.
527528
528-
# Safety _and_ speed
529+
# Safety _and_ Speed
529530
530-
Safety and speed are always presented as a continuum. On one hand, you have
531-
maximum speed, but no safety. On the other, you have absolute safety, with no
532-
speed. Rust seeks to break out of this mode by introducing safety at compile
533-
time, ensuring that you haven't done anything wrong, while compiling to the
534-
same low-level code you'd expect without the safety.
531+
Safety and speed are always presented as a continuum. At one end of the spectrum,
532+
you have maximum speed, but no safety. On the other end, you have absolute safety
533+
with no speed. Rust seeks to break out of this paradigm by introducing safety at
534+
compile time, ensuring that you haven't done anything wrong, while compiling to
535+
the same low-level code you'd expect without the safety.
535536
536537
As an example, Rust's ownership system is _entirely_ at compile time. The
537538
safety check that makes this an error about moved values:

branches/batch/src/doc/not_found.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,20 @@ Looks like you've taken a wrong turn.
1212
Some things that might be helpful to you though:
1313

1414
## Search
15+
1516
* <form action="https://duckduckgo.com/">
1617
<input type="text" id="site-search" name="q" size="80"></input>
1718
<input type="submit" value="Search DuckDuckGo">
1819
</form>
1920
* Rust doc search: <span id="core-search"></span>
2021

2122
## Reference
23+
2224
* [The Rust official site](http://rust-lang.org)
23-
* [The Rust reference](http://doc.rust-lang.org/reference.html) (* [PDF](http://doc.rust-lang.org/reference.pdf))
25+
* [The Rust reference](http://doc.rust-lang.org/reference.html)
2426

2527
## Docs
28+
2629
* [The standard library](http://doc.rust-lang.org/std/)
2730

2831
<script>

0 commit comments

Comments
 (0)