Skip to content

Rolling up PRs in the queue #21213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 139 commits into from
Jan 16, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
139 commits
Select commit Hold shift + click to select a range
78b7e13
Fix attr syntax in recursion limit diagnostic
sfackler Jan 11, 2015
9302dc5
Replace uint with u32 in trpl/guessing-game.md
CarVac Jan 10, 2015
415fc5f
Remove unused import.
jbcrail Jan 12, 2015
11737a3
iOS: fixed install phase
vhbit Jun 25, 2014
8eba032
Purge references to Rust tasks from TRPL.
ciphergoth Jan 10, 2015
e1ff480
Remove usage and reference of feature(globs) from the book
camjackson Jan 12, 2015
9333034
Update #[deriving] documentation.
huonw Jan 12, 2015
a3d87fa
Fix text in TRPL macros guide to match the example
alkor Jan 11, 2015
ba9e223
Small grammar fix in the book
steveklabnik Jan 12, 2015
c403794
Small fix in the book
steveklabnik Jan 12, 2015
285277d
Clean up unary operators in the reference
steveklabnik Jan 12, 2015
be40718
Link to sections in the book's README.md
steveklabnik Jan 12, 2015
95f9e30
Clean up wording around uninitialized values.
steveklabnik Jan 12, 2015
eabf208
Ease parsing of an English sentence
laurilehmijoki Jan 11, 2015
425f449
Remove PDF link on 404 page
steveklabnik Jan 12, 2015
db7de96
Improve clarity of paragraph in the pointer guide
steveklabnik Jan 12, 2015
d6e67e9
Vec's IntoIter should be Send/Sync when Vec is (fixes #21027)
renato-zannon Jan 12, 2015
b704983
Improve the ownership guide a tad
steveklabnik Jan 12, 2015
e485d29
Improve example in the intro.
steveklabnik Jan 12, 2015
2297b0c
Elaborate on destructuring let
steveklabnik Jan 12, 2015
16a8c4d
Don't use 'synonym' with regards to newtypes
steveklabnik Jan 12, 2015
0017bfa
Link to a better place for msys2
steveklabnik Jan 12, 2015
82eefe3
add --xpretty flowgraph,unlabelled variant.
pnkfelix Jan 12, 2015
7188460
Remove dead link from make tips
steveklabnik Jan 12, 2015
6a7f0a9
Add note about TLS lookups in random()
steveklabnik Jan 12, 2015
323abc0
add test for issue #20575
Jan 12, 2015
31ac1fb
Various changes to Rust Introduction
iKevinY Jan 11, 2015
2cc81ac
Return passed value from black_box
amaranth Jan 3, 2015
9f5fc56
Fix test failures
amaranth Jan 13, 2015
f0d7871
graphviz-flowgraph tests: use new `--xpretty flowgraph,unlabelled` op…
pnkfelix Jan 13, 2015
4b14f67
Replace usage of deriving with derive in docs
gchp Jan 6, 2015
d3cecbf
Support UFCS style calls to a method defined in `Trait` where `Self`
nikomatsakis Jan 13, 2015
5992325
Add notes about 32 vs 64 bit Windows
steveklabnik Jan 12, 2015
9af8a64
Make the Rust Book more mobile friendly
sfaxon Jan 13, 2015
064c21e
Fix a typo in std::result documentation
nagisa Jan 13, 2015
1217007
Use if-let in std::result documentation
nagisa Jan 13, 2015
07f723f
Remove unneeded box import in examples
csouth3 Jan 13, 2015
ad0ce88
Provide example of generic inverse()
steveklabnik Jan 13, 2015
806c135
Updating email address for Rohit Joshi
rohitjoshi Jan 13, 2015
d397a3e
Handle question marks in model lexer, closes #15879
fhahn Jan 13, 2015
56671cb
Prefer GEP instructions over weird pointer casting
dotdash Jan 13, 2015
6cfbcca
Update grammar/verify.rs to work with recent master
fhahn Jan 13, 2015
4021924
Re-direct to the right place.
steveklabnik Jan 14, 2015
92b4855
syntax: Don't import the pp.rs enum variants into the namespace
erickt Jan 14, 2015
caf4a90
syntax: Rewrite pp advance_left to use a constant stack size
erickt Jan 14, 2015
e14d053
syntax: factor out print_expr arms to reduce non-optimized stack usage
erickt Jan 14, 2015
5a16ceb
Improve Rust Documentation & Reference on mobile
iKevinY Jan 14, 2015
fb55628
Add examples for DList methods.
sleepynate Jan 11, 2015
428da78
TRPL: Anti-example failing for the wrong reason.
tcard Jan 14, 2015
31261fd
Disallow a form of invalid asm! macro
nagisa Jan 14, 2015
bf899e9
fix wrong link
bombless Jan 14, 2015
9b10e9a
mk: The beta channel produces things called 'beta'
brson Jan 14, 2015
6f9e1a0
Fix interaction of --no-analysis and --emit dep-info
nrc Jan 14, 2015
21a2df6
Remove old obsolete syntax errors
aochagavia Jan 11, 2015
b23289e
Remove old obsolete syntax tests
aochagavia Jan 13, 2015
02aacab
Fix DeBruijn accounting. It used to be that all trait-refs were binders,
nikomatsakis Jan 13, 2015
b92ec6a
Fix Repr output so that it does not ICE when a self-type is
nikomatsakis Jan 13, 2015
ff6085f
Fix propagation of the HAS_PROJECTION flag in object types. Fixes #20…
nikomatsakis Jan 13, 2015
2868404
Normalize associated types in the type_is_newtype_immediate pass. Fix…
nikomatsakis Jan 13, 2015
2479dfc
Revert "rustc_trans: Fix type projection debuginfo" -- it potentially…
nikomatsakis Jan 14, 2015
59e9cfa
use UFCS in `#[deriving(Hash)]`
Jan 14, 2015
5e64675
doc: fix links to servo
richo Jan 15, 2015
86948ad
fix unused import error
Jan 15, 2015
a702558
Don't impl builtin traits on non structs/enums
flaper87 Jan 15, 2015
e6f7f23
Explicitly note that vector contents are on the heap
aidanhs Jan 15, 2015
9002fdb
Make link to style guide direct
aidanhs Jan 15, 2015
28b0d40
use better span
Jan 15, 2015
e5ad89d
Remove erroneous stability attribute.
brson Jan 15, 2015
81c5fd8
Allow get_tydesc intrinsic to accept unsized types
Diggsey Jan 15, 2015
de7b3cf
Forbid impls for builtin traits on types that are not structs/enums
flaper87 Jan 15, 2015
2c71ada
Disable -C lto optimizations on opt_level=0
Zoxc Jan 15, 2015
f99d43e
remove try_node_id_to_type in favor of node_id_to_type_opt
flaper87 Jan 15, 2015
45c6423
debuginfo: Fix ICE when compiling for-loops with lines-tables-only.
michaelwoerister Jan 15, 2015
462dd64
Add explanation of main to rustdoc docs
steveklabnik Jan 12, 2015
b75cee8
Avoid unnecessary closures when deriving RustcDecodable
dotdash Jan 15, 2015
fd603cd
Clarify function return style.
steveklabnik Jan 15, 2015
baee204
rollup merge of #20463: amaranth/black_box_output
alexcrichton Jan 15, 2015
855c3e5
rollup merge of #20632: gchp/reference
alexcrichton Jan 15, 2015
d3c5cf1
rollup merge of #20892: CarVac/master
alexcrichton Jan 15, 2015
eb94c35
rollup merge of #20929: laurilehmijoki/master
alexcrichton Jan 15, 2015
0ad0b0e
rollup merge of #20964: sfackler/recursion-syntax
alexcrichton Jan 15, 2015
199d2ab
rollup merge of #20976: jbcrail/rm-unused-import
alexcrichton Jan 15, 2015
73149be
rollup merge of #20985: vhbit/ios-install
alexcrichton Jan 15, 2015
37d20f2
rollup merge of #20986: alkor/doc-fixes
alexcrichton Jan 15, 2015
c478c6a
rollup merge of #20988: ciphergoth/task-to-thread
alexcrichton Jan 15, 2015
dbbe506
rollup merge of #21001: camjackson/master
alexcrichton Jan 15, 2015
9a77e0f
rollup merge of #21005: huonw/deriving-docs
alexcrichton Jan 15, 2015
73660a1
rollup merge of #21011: steveklabnik/gh20993
alexcrichton Jan 15, 2015
c6a9877
rollup merge of #21013: steveklabnik/gh20914
alexcrichton Jan 15, 2015
ff9ae88
rollup merge of #21014: steveklabnik/gh20876
alexcrichton Jan 15, 2015
e06863e
rollup merge of #21015: steveklabnik/gh20852
alexcrichton Jan 15, 2015
6155ce5
rollup merge of #21020: steveklabnik/gh20844
alexcrichton Jan 15, 2015
cfbf313
rollup merge of #21023: steveklabnik/gh20840
alexcrichton Jan 15, 2015
b8751b8
rollup merge of #21028: steveklabnik/gh17368
alexcrichton Jan 15, 2015
8d0b937
rollup merge of #21029: steveklabnik/gh19924
alexcrichton Jan 15, 2015
21effeb
rollup merge of #21031: steveklabnik/gh19067
alexcrichton Jan 15, 2015
1ba75d2
rollup merge of #21036: renato-zannon/into-iter-impls
alexcrichton Jan 15, 2015
9d6e1f9
rollup merge of #21038: steveklabnik/gh20471
alexcrichton Jan 15, 2015
7aa7707
rollup merge of #21040: steveklabnik/gh20037
alexcrichton Jan 15, 2015
2890266
rollup merge of #21041: steveklabnik/gh17554
alexcrichton Jan 15, 2015
87dce0c
rollup merge of #21046: steveklabnik/gh16654
alexcrichton Jan 15, 2015
98d4d49
rollup merge of #21052: nick29581/methods-ext
alexcrichton Jan 15, 2015
56cf6ba
rollup merge of #21054: steveklabnik/gh17950
alexcrichton Jan 15, 2015
573c1f8
rollup merge of #21059: steveklabnik/gh16072
alexcrichton Jan 15, 2015
0093ec2
rollup merge of #21066: japaric/issue-20575
alexcrichton Jan 15, 2015
ee960af
rollup merge of #21071: sfaxon/mobile-friendly-book
alexcrichton Jan 15, 2015
46a490f
rollup merge of #21075: iKevinY/intro-changes
alexcrichton Jan 15, 2015
e2eacd5
rollup merge of #21085: pnkfelix/pp-flowgraph-kill-labels
alexcrichton Jan 15, 2015
0be4b9b
rollup merge of #21088: aochagavia/obsolete
alexcrichton Jan 15, 2015
d11f2b3
rollup merge of #21089: nikomatsakis/issue-20676-invalid-vtable-for-o…
alexcrichton Jan 15, 2015
b555528
rollup merge of #21103: nagisa/result-typo
alexcrichton Jan 15, 2015
d7009e6
rollup merge of #21105: csouth3/kill-box-import
alexcrichton Jan 15, 2015
692d942
rollup merge of #21107: nikomatsakis/assoc-type-ice-hunt-take-1
alexcrichton Jan 15, 2015
65b286d
rollup merge of #21109: steveklabnik/gh17224
alexcrichton Jan 15, 2015
7bc42b8
rollup merge of #21110: rohitjoshi/patch-1
alexcrichton Jan 15, 2015
489294d
rollup merge of #21115: dotdash/iter_vec
alexcrichton Jan 15, 2015
b83fee0
rollup merge of #21120: fhahn/issue-model-lexer-questionmark
alexcrichton Jan 15, 2015
68c3f8c
rollup merge of #21124: steveklabnik/fix_redirect
alexcrichton Jan 15, 2015
4c4092d
rollup merge of #21126: sleepynate/dlist-examples
alexcrichton Jan 15, 2015
b1a7e34
rollup merge of #21127: erickt/opt-stack
alexcrichton Jan 15, 2015
7e2ef2c
rollup merge of #21133: iKevinY/mobile-rustdoc
alexcrichton Jan 15, 2015
b86a848
rollup merge of #21141: tcard/master
alexcrichton Jan 15, 2015
9b7bc45
rollup merge of #21144: nagisa/asm-str-fix
alexcrichton Jan 15, 2015
8c81800
rollup merge of #21148: bombless/patch-1
alexcrichton Jan 15, 2015
7101ae4
rollup merge of #21151: brson/beta
alexcrichton Jan 15, 2015
9d4d5ca
rollup merge of #21156: nick29581/plugins-fix
alexcrichton Jan 15, 2015
c3c47f5
rollup merge of #21161: japaric/ufcs-hash
alexcrichton Jan 15, 2015
7be39b0
rollup merge of #21164: richo/doc/servo-link
alexcrichton Jan 15, 2015
0419b4a
rollup merge of #21167: FlaPer87/coherence-impls
alexcrichton Jan 15, 2015
ef5a4bb
rollup merge of #21168: aidanhs/aphs-doc-vec-heap
alexcrichton Jan 15, 2015
132850c
rollup merge of #21169: aidanhs/aphs-contributing-style-link
alexcrichton Jan 15, 2015
7c967af
rollup merge of #21170: Diggsey/issue-21058
alexcrichton Jan 15, 2015
b64de7e
rollup merge of #21172: brson/tuple
alexcrichton Jan 15, 2015
782c391
rollup merge of #21190: FlaPer87/remove_duplicated_func
alexcrichton Jan 15, 2015
09c0342
rollup merge of #21191: Zoxc/lto
alexcrichton Jan 15, 2015
6dc94f7
rollup merge of #21197: michaelwoerister/linestablesonly-forloop
alexcrichton Jan 15, 2015
002d840
rollup merge of #21199: dotdash/decode_lamba
alexcrichton Jan 15, 2015
5f32992
rollup merge of #21206: steveklabnik/expressions
alexcrichton Jan 15, 2015
42198c1
Test fixes and rebase conflicts
alexcrichton Jan 15, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ Robert Knight <robertknight@gmail.com>
Robert Millar <robert.millar@cantab.net>
Robin Gloster <robin@loc-com.de>
Robin Stocker <robin@nibor.org>
Rohit Joshi <rohit.joshi@capitalone.com>
Rohit Joshi <rohit.c.joshi@gmail.com>
Roland Tanglao <roland@rolandtanglao.com>
Rolf Timmermans <rolftimmermans@voormedia.com>
Rolf van de Krol <info@rolfvandekrol.nl>
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ please do two things:

Pull requests will be treated as "review requests", and we will give
feedback we expect to see corrected on
[style](https://github.com/rust-lang/rust/wiki/Note-style-guide) and
[style](http://aturon.github.io/) and
substance before pulling. Changes contributed via pull request should
focus on a single issue at a time, like any other. We will not accept
pull-requests that try to "sneak" unrelated changes in.
Expand Down
5 changes: 2 additions & 3 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,9 @@
# make check-stage1-std RUST_TEST_TASKS=1
#
# This is hardly all there is to know of The Rust Build System's
# mysteries. The tale continues on the wiki[1][2].
# mysteries. The tale continues on the wiki[1].
#
# [1]: https://github.com/rust-lang/rust/wiki/Note-getting-started-developing-Rust
# [2]: https://github.com/rust-lang/rust/wiki/Note-testsuite
# [1]: https://github.com/rust-lang/rust/wiki/Note-testsuite
#
# If you really feel like getting your hands dirty, then:
#
Expand Down
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,23 @@ documentation.

### Building on Windows

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

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

$ pacman -S mingw-w64-i686-toolchain
$ pacman -S base-devel
```bash
# choose one based on platform
$ pacman -S mingw-w64-i686-toolchain
$ pacman -S mingw-w64-x86_64-toolchain

3. With that now start `mingw32_shell.bat` from where you installed MSYS2 (i.e. `C:\msys`).
$ pacman -S base-devel
```

3. With that now start `mingw32_shell.bat` or `mingw64_shell.bat`
from where you installed MSYS2 (i.e. `C:\msys`). Which one you
choose depends on if you want 32 or 64 bit Rust.
4. From there just navigate to where you have Rust's source code, configure and build it:

$ ./configure
Expand Down
2 changes: 1 addition & 1 deletion mk/cfg/aarch64-apple-ios.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ AR_aarch64-apple-ios = $(shell xcrun -find -sdk iphoneos ar)
endif
CFG_LIB_NAME_aarch64-apple-ios = lib$(1).a
CFG_LIB_GLOB_aarch64-apple-ios = lib$(1)-*.a
CFG_LIB_SKIP_INSTALL_aarch64-apple-ios = 1 #lib$(1)-*.a
CFG_INSTALL_ONLY_RLIB_aarch64-apple-ios = 1
CFG_STATIC_LIB_NAME_aarch64-apple-ios=lib$(1).a
CFG_LIB_DSYM_GLOB_aarch64-apple-ios = lib$(1)-*.a.dSYM
CFG_CFLAGS_aarch64-apple-ios := $(CFG_IOS_SDK_FLAGS_aarch64-apple-ios)
Expand Down
2 changes: 1 addition & 1 deletion mk/cfg/armv7-apple-ios.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ AR_armv7-apple-ios = $(shell xcrun -find -sdk iphoneos ar)
endif
CFG_LIB_NAME_armv7-apple-ios = lib$(1).a
CFG_LIB_GLOB_armv7-apple-ios = lib$(1)-*.a
CFG_LIB_SKIP_INSTALL_armv7-apple-ios = 1 #lib$(1)-*.a
CFG_INSTALL_ONLY_RLIB_armv7-apple-ios = 1
CFG_STATIC_LIB_NAME_armv7-apple-ios=lib$(1).a
CFG_LIB_DSYM_GLOB_armv7-apple-ios = lib$(1)-*.a.dSYM
CFG_JEMALLOC_CFLAGS_armv7-apple-ios := -arch armv7 -mfpu=vfp3 $(CFG_IOS_SDK_FLAGS_armv7-apple-ios)
Expand Down
2 changes: 1 addition & 1 deletion mk/cfg/armv7s-apple-ios.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ AR_armv7s-apple-ios = $(shell xcrun -find -sdk iphoneos ar)
endif
CFG_LIB_NAME_armv7s-apple-ios = lib$(1).a
CFG_LIB_GLOB_armv7s-apple-ios = lib$(1)-*.a
CFG_LIB_SKIP_INSTALL_armv7s-apple-ios = 1 #lib$(1)-*.a
CFG_INSTALL_ONLY_RLIB_armv7s-apple-ios = 1
CFG_STATIC_LIB_NAME_armv7s-apple-ios=lib$(1).a
CFG_LIB_DSYM_GLOB_armv7s-apple-ios = lib$(1)-*.a.dSYM
CFG_JEMALLOC_CFLAGS_armv7s-apple-ios := -arch armv7s -mfpu=vfp4 $(CFG_IOS_SDK_FLAGS_armv7s-apple-ios)
Expand Down
1 change: 1 addition & 0 deletions mk/cfg/i386-apple-ios.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ AR_i386-apple-ios = $(shell xcrun -find -sdk iphonesimulator ar)
endif
CFG_LIB_NAME_i386-apple-ios = lib$(1).a
CFG_LIB_GLOB_i386-apple-ios = lib$(1)-*.dylib
CFG_INSTALL_ONLY_RLIB_i386-apple-ios = 1
CFG_STATIC_LIB_NAME_i386-apple-ios=lib$(1).a
CFG_LIB_DSYM_GLOB_i386-apple-ios = lib$(1)-*.dylib.dSYM
CFG_GCCISH_CFLAGS_i386-apple-ios := -Wall -Werror -g -fPIC -m32 $(CFG_IOSSIM_FLAGS_i386-apple-ios)
Expand Down
2 changes: 1 addition & 1 deletion mk/cfg/x86_64-apple-ios.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ AR_x86_64-apple-ios = $(shell xcrun -find -sdk iphonesimulator ar)
endif
CFG_LIB_NAME_x86_64-apple-ios = lib$(1).a
CFG_LIB_GLOB_x86_64-apple-ios = lib$(1)-*.a
CFG_LIB_SKIP_INSTALL_x86_64-apple-ios = 1 #lib$(1)-*.a
CFG_INSTALL_ONLY_RLIB_x86_64-apple-ios = 1
CFG_STATIC_LIB_NAME_x86_64-apple-ios=lib$(1).a
CFG_LIB_DSYM_GLOB_x86_64-apple-ios = lib$(1)-*.a.dSYM
CFG_CFLAGS_x86_64-apple-ios := $(CFG_IOSSIM_FLAGS_x86_64-apple-ios)
Expand Down
7 changes: 3 additions & 4 deletions mk/main.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ CFG_RELEASE_NUM=1.0.0
# An optional number to put after the label, e.g. '.2' -> '-beta.2'
# NB Make sure it starts with a dot to conform to semver pre-release
# versions (section 9)
CFG_PRERELEASE_VERSION=
CFG_PRERELEASE_VERSION=.1

CFG_FILENAME_EXTRA=4e7c5e5c

Expand All @@ -30,9 +30,8 @@ CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)
CFG_DISABLE_UNSTABLE_FEATURES=1
endif
ifeq ($(CFG_RELEASE_CHANNEL),beta)
# The beta channel is temporarily called 'alpha'
CFG_RELEASE=$(CFG_RELEASE_NUM)-alpha$(CFG_PRERELEASE_VERSION)
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)-alpha$(CFG_PRERELEASE_VERSION)
CFG_RELEASE=$(CFG_RELEASE_NUM)-beta(CFG_PRERELEASE_VERSION)
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)-beta(CFG_PRERELEASE_VERSION)
CFG_DISABLE_UNSTABLE_FEATURES=1
endif
ifeq ($(CFG_RELEASE_CHANNEL),nightly)
Expand Down
2 changes: 1 addition & 1 deletion mk/prepare.mk
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ prepare-target-$(2)-host-$(3)-$(1)-$(4): prepare-maybe-clean-$(4) \
$$(if $$(findstring $(3), $$(PREPARE_HOST)), \
$$(call PREPARE_DIR,$$(PREPARE_WORKING_DEST_LIB_DIR)) \
$$(foreach crate,$$(TARGET_CRATES), \
$$(if $$(findstring 1, $$(ONLY_RLIB_$$(crate))),, \
$$(if $$(or $$(findstring 1, $$(ONLY_RLIB_$$(crate))),$$(findstring 1,$$(CFG_INSTALL_ONLY_RLIB_$(2)))),, \
$$(call PREPARE_LIB,$$(call CFG_LIB_GLOB_$(2),$$(crate)))) \
$$(call PREPARE_LIB,$$(call CFG_RLIB_GLOB,$$(crate)))) \
$$(if $$(findstring $(2),$$(CFG_HOST)), \
Expand Down
2 changes: 1 addition & 1 deletion src/doc/complement-lang-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ There aren't many large programs yet. The Rust [compiler][rustc], 60,000+ lines

A research browser engine called [Servo][servo], currently 30,000+ lines across more than a dozen crates, will be exercising a lot of Rust's distinctive type-system and concurrency features, and integrating many native libraries.

[servo]: https://github.com/mozilla/servo
[servo]: https://github.com/servo/servo

Some examples that demonstrate different aspects of the language:

Expand Down
2 changes: 1 addition & 1 deletion src/doc/complement-project-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ No. It started as a Graydon Hoare's part-time side project in 2006 and remained

# What will Mozilla use Rust for?

Mozilla intends to use Rust as a platform for prototyping experimental browser architectures. Specifically, the hope is to develop a browser that is more amenable to parallelization than existing ones, while also being less prone to common C++ coding errors that result in security exploits. The name of that project is _[Servo](http://github.com/mozilla/servo)_.
Mozilla intends to use Rust as a platform for prototyping experimental browser architectures. Specifically, the hope is to develop a browser that is more amenable to parallelization than existing ones, while also being less prone to common C++ coding errors that result in security exploits. The name of that project is _[Servo](http://github.com/servo/servo)_.

# Why a BSD-style permissive license rather than MPL or tri-license?

Expand Down
63 changes: 32 additions & 31 deletions src/doc/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ accomplishes these goals by being memory safe without using garbage collection.

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

To show off Rust, let's talk about how easy it is to get started with Rust.
Then, we'll talk about Rust's most interesting feature, **ownership**, and
Then, we'll talk about Rust's most interesting feature, *ownership*, and
then discuss how it makes concurrency easier to reason about. Finally,
we'll talk about how Rust breaks down the perceived dichotomy between speed
and safety.
Expand Down Expand Up @@ -57,7 +57,7 @@ version = "0.0.1"
authors = ["Your Name <you@example.com>"]
```

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

Here's what's in `src/main.rs`:
Expand All @@ -68,7 +68,7 @@ fn main() {
}
```

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

```{bash}
Expand Down Expand Up @@ -146,8 +146,8 @@ Enough about tools, let's talk code!

# Ownership

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

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

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

The answer is that in the C++ version, `x` is a **reference** to the memory
The answer is that in the C++ version, `x` is a *reference* to the memory
location where the first element of the array is stored. But in Ruby, `x` is a
standalone value, not connected to the underyling array at all. Let's dig into
the details for a moment. Your program has access to memory, provided to it by
Expand Down Expand Up @@ -332,11 +332,11 @@ error: aborting due to previous error

When we try to mutate the array by `push`ing it the second time, Rust throws
an error. It says that we "cannot borrow v as mutable because it is also
borrowed as immutable." What's up with "borrowed"?
borrowed as immutable." What does it mean by "borrowed"?

In Rust, the type system encodes the notion of **ownership**. The variable `v`
is an "owner" of the vector. When we make a reference to `v`, we let that
variable (in this case, `x`) 'borrow' it for a while. Just like if you own a
In Rust, the type system encodes the notion of *ownership*. The variable `v`
is an *owner* of the vector. When we make a reference to `v`, we let that
variable (in this case, `x`) *borrow* it for a while. Just like if you own a
book, and you lend it to me, I'm borrowing the book.

So, when I try to modify the vector with the second call to `push`, I need
Expand Down Expand Up @@ -392,22 +392,23 @@ Here's an example of a concurrent Rust program:
use std::thread::Thread;

fn main() {
for _ in range(0u, 10u) {
Thread::spawn(move || {
let guards: Vec<_> = (0..10).map(|_| {
Thread::scoped(|| {
println!("Hello, world!");
});
}
})
}).collect();
}
```

This program creates ten threads, who all print `Hello, world!`. The
`spawn` function takes one argument, a closure, indicated by the
double bars `||`. (The `move` keyword indicates that the closure takes
ownership of any data it uses; we'll have more on the significance of
this shortly.) This closure is executed in a new thread created by
`spawn`.
This program creates ten threads, which all print `Hello, world!`. The `scoped`
function takes one argument, a closure, indicated by the double bars `||`. This
closure is executed in a new thread created by `scoped`. The method is called
`scoped` because it returns a 'join guard', which will automatically join the
child thread when it goes out of scope. Because we `collect` these guards into
a `Vec<T>`, and that vector goes out of scope at the end of our program, our
program will wait for every thread to finish before finishing.

One common form of problem in concurrent programs is a 'data race.'
One common form of problem in concurrent programs is a *data race*.
This occurs when two different threads attempt to access the same
location in memory in a non-synchronized way, where at least one of
them is a write. If one thread is attempting to read, and one thread
Expand Down Expand Up @@ -460,9 +461,9 @@ code tries to make three owners. This may cause a safety problem, so
Rust disallows it.

What to do here? Rust has two types that helps us: `Arc<T>` and `Mutex<T>`.
"Arc" stands for "atomically reference counted." In other words, an Arc will
*Arc* stands for "atomically reference counted". In other words, an Arc will
keep track of the number of references to something, and not free the
associated resource until the count is zero. The 'atomic' portion refers to an
associated resource until the count is zero. The *atomic* portion refers to an
Arc's usage of concurrency primitives to atomically update the count, making it
safe across threads. If we use an Arc, we can have our three references. But,
an Arc does not allow mutable borrows of the data it holds, and we want to
Expand Down Expand Up @@ -525,13 +526,13 @@ give us assurance _at compile time_ that we weren't doing something incorrect
with regards to concurrency. In order to share ownership, we were forced to be
explicit and use a mechanism to ensure that it would be properly handled.

# Safety _and_ speed
# Safety _and_ Speed

Safety and speed are always presented as a continuum. On one hand, you have
maximum speed, but no safety. On the other, you have absolute safety, with no
speed. Rust seeks to break out of this mode by introducing safety at compile
time, ensuring that you haven't done anything wrong, while compiling to the
same low-level code you'd expect without the safety.
Safety and speed are always presented as a continuum. At one end of the spectrum,
you have maximum speed, but no safety. On the other end, you have absolute safety
with no speed. Rust seeks to break out of this paradigm by introducing safety at
compile time, ensuring that you haven't done anything wrong, while compiling to
the same low-level code you'd expect without the safety.

As an example, Rust's ownership system is _entirely_ at compile time. The
safety check that makes this an error about moved values:
Expand Down
5 changes: 4 additions & 1 deletion src/doc/not_found.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,20 @@ Looks like you've taken a wrong turn.
Some things that might be helpful to you though:

## Search

* <form action="https://duckduckgo.com/">
<input type="text" id="site-search" name="q" size="80"></input>
<input type="submit" value="Search DuckDuckGo">
</form>
* Rust doc search: <span id="core-search"></span>

## Reference

* [The Rust official site](http://rust-lang.org)
* [The Rust reference](http://doc.rust-lang.org/reference.html) (* [PDF](http://doc.rust-lang.org/reference.pdf))
* [The Rust reference](http://doc.rust-lang.org/reference.html)

## Docs

* [The standard library](http://doc.rust-lang.org/std/)

<script>
Expand Down
Loading