Skip to content

Commit 39edc76

Browse files
committed
---
yaml --- r: 236151 b: refs/heads/stable c: cb250b7 h: refs/heads/master i: 236149: d391b6a 236147: 5b1204a 236143: c744078 v: v3
1 parent e10cb43 commit 39edc76

File tree

282 files changed

+7529
-7948
lines changed

Some content is hidden

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

282 files changed

+7529
-7948
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 76db37ee4b916a678181b36e42c26d92524e7041
32+
refs/heads/stable: cb250b722e8c9c8b2e6dff249ce8e027dce2cd65
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/.gitattributes

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,4 @@
66
*.rs rust
77
src/etc/pkg/rust-logo.ico binary
88
src/etc/pkg/rust-logo.png binary
9-
src/rt/msvc/* -whitespace
10-
src/rt/valgrind/* -whitespace
119
*.woff binary

branches/stable/configure

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,11 +1005,9 @@ then
10051005
(''|*clang)
10061006
CFG_CLANG_REPORTED_VERSION=$($CFG_CC --version | grep version)
10071007

1008-
if [[ $CFG_CLANG_REPORTED_VERSION == *"(based on LLVM "* ]]
1009-
then
1008+
if echo $CFG_CLANG_REPORTED_VERSION | grep -q "(based on LLVM "; then
10101009
CFG_CLANG_VERSION=$(echo $CFG_CLANG_REPORTED_VERSION | sed 's/.*(based on LLVM \(.*\))/\1/')
1011-
elif [[ $CFG_CLANG_REPORTED_VERSION == "Apple LLVM"* ]]
1012-
then
1010+
elif echo $CFG_CLANG_REPORTED_VERSION | grep -q "Apple LLVM"; then
10131011
CFG_OSX_CLANG_VERSION=$(echo $CFG_CLANG_REPORTED_VERSION | sed 's/.*version \(.*\) .*/\1/')
10141012
else
10151013
CFG_CLANG_VERSION=$(echo $CFG_CLANG_REPORTED_VERSION | sed 's/.*version \(.*\) .*/\1/')

branches/stable/mk/ctags.mk

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,11 @@
1515

1616
.PHONY: TAGS.emacs TAGS.vi
1717

18-
# This is using a blacklist approach, probably more durable than a whitelist.
19-
# We exclude: external dependencies (llvm, rt/{msvc,vg}),
20-
# tests (compiletest, test) and a couple of other things (rt/arch, etc)
21-
CTAGS_LOCATIONS=$(patsubst ${CFG_SRC_DIR}src/llvm,, \
22-
$(patsubst ${CFG_SRC_DIR}src/compiletest,, \
23-
$(patsubst ${CFG_SRC_DIR}src/test,, \
24-
$(patsubst ${CFG_SRC_DIR}src/etc,, \
25-
$(patsubst ${CFG_SRC_DIR}src/rt,, \
26-
$(patsubst ${CFG_SRC_DIR}src/rt/arch,, \
27-
$(patsubst ${CFG_SRC_DIR}src/rt/msvc,, \
28-
$(patsubst ${CFG_SRC_DIR}src/rt/vg,, \
29-
$(wildcard ${CFG_SRC_DIR}src/*) $(wildcard ${CFG_SRC_DIR}src/rt/*) \
30-
))))))))
31-
CTAGS_OPTS=--options="${CFG_SRC_DIR}src/etc/ctags.rust" --languages=-javascript --recurse ${CTAGS_LOCATIONS}
32-
# We could use `--languages=Rust`, but there is value in producing tags for the
33-
# C++ parts of the code base too (at the time of writing, those are .h and .cpp
34-
# files in src/rt, src/rt/sync and src/rustllvm); we mainly just want to
35-
# exclude the external dependencies.
18+
CTAGS_LOCATIONS=$(wildcard ${CFG_SRC_DIR}src/lib*)
19+
CTAGS_LOCATIONS=$(patsubst ${CFG_SRC_DIR}src/librust%,, \
20+
$(patsubst ${CFG_SRC_DIR}src/lib%test,, \
21+
$(wildcard ${CFG_SRC_DIR}src/lib*))) ${CFG_SRC_DIR}src/libtest
22+
CTAGS_OPTS=--options="${CFG_SRC_DIR}src/etc/ctags.rust" --languages=Rust --recurse ${CTAGS_LOCATIONS}
3623

3724
TAGS.emacs:
3825
ctags -e -f $@ ${CTAGS_OPTS}

branches/stable/mk/docs.mk

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ ERR_IDX_GEN = $(RPATH_VAR2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) $(ERR_IDX_GEN_EXE)
7777

7878
D := $(S)src/doc
7979

80-
DOC_TARGETS := trpl style error-index
80+
DOC_TARGETS := trpl tarpl style error-index
8181
COMPILER_DOC_TARGETS :=
8282
DOC_L10N_TARGETS :=
8383

@@ -287,6 +287,13 @@ doc/book/index.html: $(RUSTBOOK_EXE) $(wildcard $(S)/src/doc/trpl/*.md) | doc/
287287
$(Q)rm -rf doc/book
288288
$(Q)$(RUSTBOOK) build $(S)src/doc/trpl doc/book
289289

290+
tarpl: doc/adv-book/index.html
291+
292+
doc/adv-book/index.html: $(RUSTBOOK_EXE) $(wildcard $(S)/src/doc/tarpl/*.md) | doc/
293+
@$(call E, rustbook: $@)
294+
$(Q)rm -rf doc/adv-book
295+
$(Q)$(RUSTBOOK) build $(S)src/doc/tarpl doc/adv-book
296+
290297
style: doc/style/index.html
291298

292299
doc/style/index.html: $(RUSTBOOK_EXE) $(wildcard $(S)/src/doc/style/*.md) | doc/

branches/stable/mk/tests.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ $(foreach doc,$(DOCS), \
162162
$(eval $(call DOCTEST,md-$(doc),$(S)src/doc/$(doc).md)))
163163
$(foreach file,$(wildcard $(S)src/doc/trpl/*.md), \
164164
$(eval $(call DOCTEST,$(file:$(S)src/doc/trpl/%.md=trpl-%),$(file))))
165-
165+
$(foreach file,$(wildcard $(S)src/doc/tarpl/*.md), \
166+
$(eval $(call DOCTEST,$(file:$(S)src/doc/tarpl/%.md=tarpl-%),$(file))))
166167
######################################################################
167168
# Main test targets
168169
######################################################################
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
% The Advanced Rust Programming Language
2+
3+
# NOTE: This is a draft document, and may contain serious errors
4+
5+
So you've played around with Rust a bit. You've written a few simple programs and
6+
you think you grok the basics. Maybe you've even read through
7+
*[The Rust Programming Language][trpl]*. Now you want to get neck-deep in all the
8+
nitty-gritty details of the language. You want to know those weird corner-cases.
9+
You want to know what the heck `unsafe` really means, and how to properly use it.
10+
This is the book for you.
11+
12+
To be clear, this book goes into *serious* detail. We're going to dig into
13+
exception-safety and pointer aliasing. We're going to talk about memory
14+
models. We're even going to do some type-theory. This is stuff that you
15+
absolutely *don't* need to know to write fast and safe Rust programs.
16+
You could probably close this book *right now* and still have a productive
17+
and happy career in Rust.
18+
19+
However if you intend to write unsafe code -- or just *really* want to dig into
20+
the guts of the language -- this book contains *invaluable* information.
21+
22+
Unlike *The Rust Programming Language* we *will* be assuming considerable prior
23+
knowledge. In particular, you should be comfortable with:
24+
25+
* Basic Systems Programming:
26+
* Pointers
27+
* [The stack and heap][]
28+
* The memory hierarchy (caches)
29+
* Threads
30+
31+
* [Basic Rust][]
32+
33+
Due to the nature of advanced Rust programming, we will be spending a lot of time
34+
talking about *safety* and *guarantees*. In particular, a significant portion of
35+
the book will be dedicated to correctly writing and understanding Unsafe Rust.
36+
37+
[trpl]: ../book/
38+
[The stack and heap]: ../book/the-stack-and-the-heap.html
39+
[Basic Rust]: ../book/syntax-and-semantics.html
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Summary
2+
3+
* [Meet Safe and Unsafe](meet-safe-and-unsafe.md)
4+
* [How Safe and Unsafe Interact](safe-unsafe-meaning.md)
5+
* [Working with Unsafe](working-with-unsafe.md)
6+
* [Data Layout](data.md)
7+
* [repr(Rust)](repr-rust.md)
8+
* [Exotically Sized Types](exotic-sizes.md)
9+
* [Other reprs](other-reprs.md)
10+
* [Ownership](ownership.md)
11+
* [References](references.md)
12+
* [Lifetimes](lifetimes.md)
13+
* [Limits of lifetimes](lifetime-mismatch.md)
14+
* [Lifetime Elision](lifetime-elision.md)
15+
* [Unbounded Lifetimes](unbounded-lifetimes.md)
16+
* [Higher-Rank Trait Bounds](hrtb.md)
17+
* [Subtyping and Variance](subtyping.md)
18+
* [Drop Check](dropck.md)
19+
* [PhantomData](phantom-data.md)
20+
* [Splitting Borrows](borrow-splitting.md)
21+
* [Type Conversions](conversions.md)
22+
* [Coercions](coercions.md)
23+
* [The Dot Operator](dot-operator.md)
24+
* [Casts](casts.md)
25+
* [Transmutes](transmutes.md)
26+
* [Uninitialized Memory](uninitialized.md)
27+
* [Checked](checked-uninit.md)
28+
* [Drop Flags](drop-flags.md)
29+
* [Unchecked](unchecked-uninit.md)
30+
* [Ownership Based Resource Management](obrm.md)
31+
* [Constructors](constructors.md)
32+
* [Destructors](destructors.md)
33+
* [Leaking](leaking.md)
34+
* [Unwinding](unwinding.md)
35+
* [Exception Safety](exception-safety.md)
36+
* [Poisoning](poisoning.md)
37+
* [Concurrency](concurrency.md)
38+
* [Races](races.md)
39+
* [Send and Sync](send-and-sync.md)
40+
* [Atomics](atomics.md)
41+
* [Implementing Vec](vec.md)
42+
* [Layout](vec-layout.md)
43+
* [Allocating](vec-alloc.md)
44+
* [Push and Pop](vec-push-pop.md)
45+
* [Deallocating](vec-dealloc.md)
46+
* [Deref](vec-deref.md)
47+
* [Insert and Remove](vec-insert-remove.md)
48+
* [IntoIter](vec-into-iter.md)
49+
* [RawVec](vec-raw.md)
50+
* [Drain](vec-drain.md)
51+
* [Handling Zero-Sized Types](vec-zsts.md)
52+
* [Final Code](vec-final.md)
53+
* [Implementing Arc and Mutex](arc-and-mutex.md)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
% Implementing Arc and Mutex
2+
3+
Knowing the theory is all fine and good, but the *best* way to understand
4+
something is to use it. To better understand atomics and interior mutability,
5+
we'll be implementing versions of the standard library's Arc and Mutex types.
6+
7+
TODO: ALL OF THIS OMG

0 commit comments

Comments
 (0)