Skip to content
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

Rolling up PRs in the queue #14164

Merged
merged 19 commits into from
May 13, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
6 changes: 3 additions & 3 deletions man/rustc.1
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Set lint forbidden
Set internal debugging options. Use "-Z help" to print available options.
.TP
\fB\-C\fR FLAG[=VAL], \fB\-\-codegen\fR FLAG[=VAL]
Set a codegen-related flag to the value specifie.d Use "-C help" to print
Set a codegen-related flag to the value specified. Use "-C help" to print
available flags. See CODEGEN OPTIONS below
.TP
\fB\-v\fR, \fB\-\-version\fR
Expand All @@ -119,7 +119,7 @@ is invoked.
.TP
\fBtarget-cpu\fR=help
Selects a target processor. If the value is 'help', then a list of available
cpus is printed.
CPUs is printed.
.TP
\fBtarget-feature\fR='+feature1 -feature2'
A space-separated list of features to enable or disable for the target. A
Expand All @@ -132,7 +132,7 @@ cause rustc to print all known passes and exit. The passes specified are
appended at the end of the normal pass manager.
.TP
\fBllvm-args\fR='-arg1 -arg2'
A space-separted list of argument to pass through to LLVM.
A space-separated list of arguments to pass through to LLVM.
.TP
\fBsave-temps\fR
If specified, the compiler will save more files (.bc, .o, .no-opt.bc) generated
Expand Down
2 changes: 1 addition & 1 deletion mk/main.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
######################################################################

# The version number
CFG_RELEASE_NUM=0.11
CFG_RELEASE_NUM=0.11.0
CFG_RELEASE_LABEL=-pre

ifndef CFG_ENABLE_NIGHTLY
Expand Down
4 changes: 2 additions & 2 deletions src/doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ To generate .pot and .po files, do something like:
~~~~
po4a --copyright-holder="The Rust Project Developers" \
--package-name="Rust" \
--package-version="0.11-pre" \
--package-version="0.11.0-pre" \
-M UTF-8 -L UTF-8 \
src/doc/po4a.conf
~~~~

(the version number must be changed if it is not 0.11-pre now.)
(the version number must be changed if it is not 0.11.0-pre now.)

Now you can translate documents with .po files, commonly used with gettext. If
you are not familiar with gettext-based translation, please read the online
Expand Down
2 changes: 1 addition & 1 deletion src/doc/po/ja/complement-cheatsheet.md.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Rust 0.11-pre\n"
"Project-Id-Version: Rust 0.11.0-pre\n"
"POT-Creation-Date: 2014-02-03 08:13+0900\n"
"PO-Revision-Date: 2014-01-13 12:01+0900\n"
"Last-Translator: Automatically generated\n"
Expand Down
2 changes: 1 addition & 1 deletion src/doc/po/ja/complement-lang-faq.md.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Rust 0.11-pre\n"
"Project-Id-Version: Rust 0.11.0-pre\n"
"POT-Creation-Date: 2014-02-03 08:13+0900\n"
"PO-Revision-Date: 2014-01-13 12:01+0900\n"
"Last-Translator: Automatically generated\n"
Expand Down
2 changes: 1 addition & 1 deletion src/doc/po/ja/complement-project-faq.md.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Rust 0.11-pre\n"
"Project-Id-Version: Rust 0.11.0-pre\n"
"POT-Creation-Date: 2014-02-03 08:13+0900\n"
"PO-Revision-Date: 2014-01-13 12:01+0900\n"
"Last-Translator: Automatically generated\n"
Expand Down
2 changes: 1 addition & 1 deletion src/doc/po/ja/complement-usage-faq.md.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Rust 0.11-pre\n"
"Project-Id-Version: Rust 0.11.0-pre\n"
"POT-Creation-Date: 2014-02-03 08:13+0900\n"
"PO-Revision-Date: 2014-02-03 08:13+0900\n"
"Last-Translator: Automatically generated\n"
Expand Down
2 changes: 1 addition & 1 deletion src/doc/po/ja/guide-conditions.md.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Rust 0.11-pre\n"
"Project-Id-Version: Rust 0.11.0-pre\n"
"POT-Creation-Date: 2014-02-03 08:13+0900\n"
"PO-Revision-Date: 2014-01-13 12:01+0900\n"
"Last-Translator: Automatically generated\n"
Expand Down
2 changes: 1 addition & 1 deletion src/doc/po/ja/guide-container.md.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Rust 0.11-pre\n"
"Project-Id-Version: Rust 0.11.0-pre\n"
"POT-Creation-Date: 2014-02-03 08:13+0900\n"
"PO-Revision-Date: 2014-01-13 12:01+0900\n"
"Last-Translator: Automatically generated\n"
Expand Down
2 changes: 1 addition & 1 deletion src/doc/po/ja/guide-ffi.md.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Rust 0.11-pre\n"
"Project-Id-Version: Rust 0.11.0-pre\n"
"POT-Creation-Date: 2014-02-03 08:13+0900\n"
"PO-Revision-Date: 2014-01-13 12:01+0900\n"
"Last-Translator: Automatically generated\n"
Expand Down
2 changes: 1 addition & 1 deletion src/doc/po/ja/guide-lifetimes.md.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Rust 0.11-pre\n"
"Project-Id-Version: Rust 0.11.0-pre\n"
"POT-Creation-Date: 2014-02-03 08:13+0900\n"
"PO-Revision-Date: 2014-01-13 12:01+0900\n"
"Last-Translator: Automatically generated\n"
Expand Down
2 changes: 1 addition & 1 deletion src/doc/po/ja/guide-macros.md.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Rust 0.11-pre\n"
"Project-Id-Version: Rust 0.11.0-pre\n"
"POT-Creation-Date: 2014-02-03 08:13+0900\n"
"PO-Revision-Date: 2014-01-13 12:01+0900\n"
"Last-Translator: Automatically generated\n"
Expand Down
2 changes: 1 addition & 1 deletion src/doc/po/ja/guide-pointers.md.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Rust 0.11-pre\n"
"Project-Id-Version: Rust 0.11.0-pre\n"
"POT-Creation-Date: 2014-02-03 08:13+0900\n"
"PO-Revision-Date: 2014-01-13 12:01+0900\n"
"Last-Translator: Automatically generated\n"
Expand Down
2 changes: 1 addition & 1 deletion src/doc/po/ja/guide-runtime.md.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Rust 0.11-pre\n"
"Project-Id-Version: Rust 0.11.0-pre\n"
"POT-Creation-Date: 2014-02-03 08:13+0900\n"
"PO-Revision-Date: 2014-02-03 08:13+0900\n"
"Last-Translator: Automatically generated\n"
Expand Down
2 changes: 1 addition & 1 deletion src/doc/po/ja/guide-tasks.md.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Rust 0.11-pre\n"
"Project-Id-Version: Rust 0.11.0-pre\n"
"POT-Creation-Date: 2014-02-03 08:13+0900\n"
"PO-Revision-Date: 2014-01-13 12:01+0900\n"
"Last-Translator: Automatically generated\n"
Expand Down
2 changes: 1 addition & 1 deletion src/doc/po/ja/guide-testing.md.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Rust 0.11-pre\n"
"Project-Id-Version: Rust 0.11.0-pre\n"
"POT-Creation-Date: 2014-02-03 08:13+0900\n"
"PO-Revision-Date: 2014-01-13 12:01+0900\n"
"Last-Translator: Automatically generated\n"
Expand Down
2 changes: 1 addition & 1 deletion src/doc/po/ja/index.md.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Rust 0.11-pre\n"
"Project-Id-Version: Rust 0.11.0-pre\n"
"POT-Creation-Date: 2014-02-03 08:13+0900\n"
"PO-Revision-Date: 2014-01-14 21:02+0900\n"
"Last-Translator: Automatically generated\n"
Expand Down
2 changes: 1 addition & 1 deletion src/doc/po/ja/rustdoc.md.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Rust 0.11-pre\n"
"Project-Id-Version: Rust 0.11.0-pre\n"
"POT-Creation-Date: 2014-02-03 08:13+0900\n"
"PO-Revision-Date: 2014-01-13 12:01+0900\n"
"Last-Translator: Automatically generated\n"
Expand Down
72 changes: 35 additions & 37 deletions src/doc/rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ The keywords are the following strings:
~~~~ {.notrust .keyword}
as
box break
crate
continue crate
else enum extern
false fn for
if impl in
Expand Down Expand Up @@ -2924,18 +2924,16 @@ while i < 10 {

### Infinite loops

The keyword `loop` in Rust appears both in _loop expressions_ and in _continue expressions_.
A loop expression denotes an infinite loop;
see [Continue expressions](#continue-expressions) for continue expressions.
A `loop` expression denotes an infinite loop.

~~~~ {.notrust .ebnf .gram}
loop_expr : [ lifetime ':' ] "loop" '{' block '}';
~~~~

A `loop` expression may optionally have a _label_.
If a label is present,
then labeled `break` and `loop` expressions nested within this loop may exit out of this loop or return control to its head.
See [Break expressions](#break-expressions).
then labeled `break` and `continue` expressions nested within this loop may exit out of this loop or return control to its head.
See [Break expressions](#break-expressions) and [Continue expressions](#continue-expressions).

### Break expressions

Expand All @@ -2953,21 +2951,21 @@ but must enclose it.
### Continue expressions

~~~~ {.notrust .ebnf .gram}
continue_expr : "loop" [ lifetime ];
continue_expr : "continue" [ lifetime ];
~~~~

A continue expression, written `loop`, also has an optional `label`.
A `continue` expression has an optional `label`.
If the label is absent,
then executing a `loop` expression immediately terminates the current iteration of the innermost loop enclosing it,
then executing a `continue` expression immediately terminates the current iteration of the innermost loop enclosing it,
returning control to the loop *head*.
In the case of a `while` loop,
the head is the conditional expression controlling the loop.
In the case of a `for` loop, the head is the call-expression controlling the loop.
If the label is present, then `loop foo` returns control to the head of the loop with label `foo`,
If the label is present, then `continue foo` returns control to the head of the loop with label `foo`,
which need not be the innermost label enclosing the `break` expression,
but must enclose it.

A `loop` expression is only permitted in the body of a loop.
A `continue` expression is only permitted in the body of a loop.

### For expressions

Expand Down Expand Up @@ -4008,45 +4006,45 @@ compiler must at some point make a choice between these two formats. With this
in mind, the compiler follows these rules when determining what format of
dependencies will be used:

1. If a dynamic library is being produced, then it is required for all upstream
Rust dependencies to also be dynamic. This is a limitation of the current
implementation of the linkage model. The reason behind this limitation is to
prevent multiple copies of the same upstream library from showing up, and in
the future it is planned to support a mixture of dynamic and static linking.

When producing a dynamic library, the compiler will generate an error if an
upstream dependency could not be found, and also if an upstream dependency
could only be found in an `rlib` format. Remember that `staticlib` formats
are always ignored by `rustc` for crate-linking purposes.

2. If a static library is being produced, all upstream dependencies are
1. If a static library is being produced, all upstream dependencies are
required to be available in `rlib` formats. This requirement stems from the
same reasons that a dynamic library must have all dynamic dependencies.
reason that a dynamic library cannot be converted into a static format.

Note that it is impossible to link in native dynamic dependencies to a static
library, and in this case warnings will be printed about all unlinked native
dynamic dependencies.

3. If an `rlib` file is being produced, then there are no restrictions on what
2. If an `rlib` file is being produced, then there are no restrictions on what
format the upstream dependencies are available in. It is simply required that
all upstream dependencies be available for reading metadata from.

The reason for this is that `rlib` files do not contain any of their upstream
dependencies. It wouldn't be very efficient for all `rlib` files to contain a
copy of `libstd.rlib`!

4. If an executable is being produced, then things get a little interesting. As
with the above limitations in dynamic and static libraries, it is required
for all upstream dependencies to be in the same format. The next question is
whether to prefer a dynamic or a static format. The compiler currently favors
static linking over dynamic linking, but this can be inverted with the `-C
prefer-dynamic` flag to the compiler.

What this means is that first the compiler will attempt to find all upstream
dependencies as `rlib` files, and if successful, it will create a statically
linked executable. If an upstream dependency is missing as an `rlib` file,
then the compiler will force all dependencies to be dynamic and will generate
errors if dynamic versions could not be found.
3. If an executable is being produced and the `-C prefer-dynamic` flag is not
specified, then dependencies are first attempted to be found in the `rlib`
format. If some dependencies are not available in an rlib format, then
dynamic linking is attempted (see below).

4. If a dynamic library or an executable that is being dynamically linked is
being produced, then the compiler will attempt to reconcile the available
dependencies in either the rlib or dylib format to create a final product.

A major goal of the compiler is to ensure that a library never appears more
than once in any artifact. For example, if dynamic libraries B and C were
each statically linked to library A, then a crate could not link to B and C
together because there would be two copies of A. The compiler allows mixing
the rlib and dylib formats, but this restriction must be satisfied.

The compiler currently implements no method of hinting what format a library
should be linked with. When dynamically linking, the compiler will attempt to
maximize dynamic dependencies while still allowing some dependencies to be
linked in via an rlib.

For most situations, having all libraries available as a dylib is recommended
if dynamically linking. For other situations, the compiler will emit a
warning if it is unable to determine which formats to link each library with.

In general, `--crate-type=bin` or `--crate-type=lib` should be sufficient for
all compilation needs, and the other options are just available if more
Expand Down
2 changes: 1 addition & 1 deletion src/doc/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -2155,7 +2155,7 @@ unless they contain references.

* `Share` - Types that are *threadsafe*
These are types that are safe to be used across several threads with access to
a `&T` pointer. `MutexArc` is an example of a *sharable* type with internal mutable data.
a `&T` pointer. `Mutex<T>` is an example of a *sharable* type with internal mutable data.

* `'static` - Non-borrowed types.
These are types that do not contain any data whose lifetime is bound to
Expand Down
4 changes: 3 additions & 1 deletion src/etc/check-binaries.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright 2013 The Rust Project Developers. See the COPYRIGHT
#!/usr/bin/env python
#
# Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution and at
# http://rust-lang.org/COPYRIGHT.
#
Expand Down
2 changes: 2 additions & 0 deletions src/etc/check-summary.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env python
#
# Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution and at
# http://rust-lang.org/COPYRIGHT.
Expand Down
2 changes: 1 addition & 1 deletion src/etc/emacs/rust-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
1 font-lock-preprocessor-face)

;; Syntax extension invocations like `foo!`, highlight including the !
(,(concat (rust-re-grab (concat rust-re-ident "!")) "[({[:space:]]")
(,(concat (rust-re-grab (concat rust-re-ident "!")) "[({[:space:][]")
1 font-lock-preprocessor-face)

;; Field names like `foo:`, highlight excluding the :
Expand Down
2 changes: 2 additions & 0 deletions src/etc/extract_grammar.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env python
#
# Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution and at
# http://rust-lang.org/COPYRIGHT.
Expand Down
4 changes: 3 additions & 1 deletion src/etc/get-snapshot.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright 2011-2013 The Rust Project Developers. See the COPYRIGHT
#!/usr/bin/env python
#
# Copyright 2011-2014 The Rust Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution and at
# http://rust-lang.org/COPYRIGHT.
#
Expand Down
2 changes: 1 addition & 1 deletion src/etc/kate/rust.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<!ENTITY rustIdent "[a-zA-Z_][a-zA-Z_0-9]*">
<!ENTITY rustIntSuf "([iu](8|16|32|64)?)?">
]>
<language name="Rust" version="0.11-pre" kateversion="2.4" section="Sources" extensions="*.rs" mimetype="text/x-rust" priority="15">
<language name="Rust" version="0.11.0-pre" kateversion="2.4" section="Sources" extensions="*.rs" mimetype="text/x-rust" priority="15">
<highlighting>
<list name="fn">
<item> fn </item>
Expand Down
4 changes: 3 additions & 1 deletion src/etc/make-snapshot.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright 2011-2013 The Rust Project Developers. See the COPYRIGHT
#!/usr/bin/env python
#
# Copyright 2011-2014 The Rust Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution and at
# http://rust-lang.org/COPYRIGHT.
#
Expand Down
2 changes: 1 addition & 1 deletion src/libarena/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//! of individual objects while the arena itself is still alive. The benefit
//! of an arena is very fast allocation; just a pointer bump.

#![crate_id = "arena#0.11-pre"]
#![crate_id = "arena#0.11.0-pre"]
#![crate_type = "rlib"]
#![crate_type = "dylib"]
#![license = "MIT/ASL2"]
Expand Down
2 changes: 1 addition & 1 deletion src/libcollections/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Collection types.
*/

#![crate_id = "collections#0.11-pre"]
#![crate_id = "collections#0.11.0-pre"]
#![crate_type = "rlib"]
#![crate_type = "dylib"]
#![license = "MIT/ASL2"]
Expand Down
Loading