]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #24721 - vosen:patch-1, r=steveklabnik
authorManish Goregaokar <manishsmail@gmail.com>
Fri, 24 Apr 2015 04:14:18 +0000 (09:44 +0530)
committerManish Goregaokar <manishsmail@gmail.com>
Fri, 24 Apr 2015 13:51:14 +0000 (19:21 +0530)
`us` and `is` were replaced with `usize` and `isize` some time ago. Other than that, 3.5.2.1.5 is correct.

46 files changed:
mk/tests.mk
src/compiletest/runtest.rs
src/doc/reference.md
src/doc/trpl/SUMMARY.md
src/doc/trpl/debug-and-display.md [deleted file]
src/doc/trpl/macros.md
src/liballoc/arc.rs
src/libcore/raw.rs
src/librustc/diagnostics.rs
src/librustc/middle/traits/select.rs
src/librustdoc/html/render.rs
src/librustdoc/html/static/main.js
src/libstd/dynamic_lib.rs
src/libstd/io/stdio.rs
src/libstd/sync/mpsc/mod.rs
src/libsyntax/parse/parser.rs
src/test/compile-fail-fulldeps/macro-crate-rlib.rs
src/test/run-make/simd-ffi/Makefile
src/test/run-pass-fulldeps/compiler-calls.rs
src/test/run-pass-fulldeps/create-dir-all-bare.rs
src/test/run-pass-fulldeps/issue-15149.rs
src/test/run-pass-fulldeps/issue-16992.rs
src/test/run-pass-fulldeps/issue-18763-quote-token-tree.rs
src/test/run-pass-fulldeps/qquote.rs
src/test/run-pass-fulldeps/quote-tokens.rs
src/test/run-pass-fulldeps/quote-unused-sp-no-warning.rs
src/test/run-pass-fulldeps/rename-directory.rs
src/test/rustdoc/default-impl.rs
src/test/rustdoc/extern-default-method.rs
src/test/rustdoc/extern-method.rs
src/test/rustdoc/ffi.rs
src/test/rustdoc/inline-default-methods.rs
src/test/rustdoc/issue-13698.rs
src/test/rustdoc/issue-15318-2.rs
src/test/rustdoc/issue-15318.rs
src/test/rustdoc/issue-17476.rs
src/test/rustdoc/issue-19190-3.rs
src/test/rustdoc/issue-20646.rs
src/test/rustdoc/issue-20727-2.rs
src/test/rustdoc/issue-20727-3.rs
src/test/rustdoc/issue-20727-4.rs
src/test/rustdoc/issue-20727.rs
src/test/rustdoc/issue-21092.rs
src/test/rustdoc/issue-21801.rs
src/test/rustdoc/issue-22025.rs
src/test/rustdoc/issue-23207.rs

index 0de622f12ea5974a41fec12bf7a37fbbc1b4ca88..5d100958edc92296565b17a382efd439fcfd3fd4 100644 (file)
@@ -753,13 +753,6 @@ PRETTY_DEPS_pretty-rpass-full = $(RPASS_FULL_TESTS)
 PRETTY_DEPS_pretty-rfail = $(RFAIL_TESTS)
 PRETTY_DEPS_pretty-bench = $(BENCH_TESTS)
 PRETTY_DEPS_pretty-pretty = $(PRETTY_TESTS)
-# The stage- and host-specific dependencies are for e.g. macro_crate_test which pulls in
-# external crates.
-PRETTY_DEPS$(1)_H_$(3)_pretty-rpass =
-PRETTY_DEPS$(1)_H_$(3)_pretty-rpass-full = $$(HLIB$(1)_H_$(3))/stamp.syntax $$(HLIB$(1)_H_$(3))/stamp.rustc
-PRETTY_DEPS$(1)_H_$(3)_pretty-rfail =
-PRETTY_DEPS$(1)_H_$(3)_pretty-bench =
-PRETTY_DEPS$(1)_H_$(3)_pretty-pretty =
 PRETTY_DIRNAME_pretty-rpass = run-pass
 PRETTY_DIRNAME_pretty-rpass-valgrind = run-pass-valgrind
 PRETTY_DIRNAME_pretty-rpass-full = run-pass-fulldeps
@@ -767,6 +760,15 @@ PRETTY_DIRNAME_pretty-rfail = run-fail
 PRETTY_DIRNAME_pretty-bench = bench
 PRETTY_DIRNAME_pretty-pretty = pretty
 
+define DEF_PRETTY_FULLDEPS
+PRETTY_DEPS$(1)_T_$(2)_H_$(3)_pretty-rpass-full = $$(CSREQ$(1)_T_$(3)_H_$(3))
+endef
+
+$(foreach host,$(CFG_HOST), \
+ $(foreach target,$(CFG_TARGET), \
+  $(foreach stage,$(STAGES), \
+   $(eval $(call DEF_PRETTY_FULLDEPS,$(stage),$(target),$(host))))))
+
 define DEF_RUN_PRETTY_TEST
 
 PRETTY_ARGS$(1)-T-$(2)-H-$(3)-$(4) := \
@@ -780,7 +782,7 @@ check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4
 $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
                $$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
                $$(PRETTY_DEPS_$(4)) \
-               $$(PRETTY_DEPS$(1)_H_$(3)_$(4))
+               $$(PRETTY_DEPS$(1)_T_$(2)_H_$(3)_$(4))
        @$$(call E, run pretty-rpass [$(2)]: $$<)
        $$(Q)touch $$@.start_time
        $$(Q)$$(call CFG_RUN_CTEST_$(2),$(1),$$<,$(3)) \
index 91550ae746157313cce613a5a6b1f3df22679bef..3d4aebad9d69f7d9965de858b7c8601033338047 100644 (file)
@@ -1465,7 +1465,7 @@ fn make_out_name(config: &Config, testfile: &Path, extension: &str) -> PathBuf {
 fn aux_output_dir_name(config: &Config, testfile: &Path) -> PathBuf {
     let f = output_base_name(config, testfile);
     let mut fname = f.file_name().unwrap().to_os_string();
-    fname.push("libaux");
+    fname.push(&format!(".{}.libaux", config.mode));
     f.with_file_name(&fname)
 }
 
index d1bc676f6ad0e70b8848a4f792d97a3eaadc8f65..555bc693233f4a448b84f59411b8ed89beebcf45 100644 (file)
@@ -29,7 +29,7 @@ You may also be interested in the [grammar].
 
 # Notation
 
-Rust's grammar is defined over Unicode codepoints, each conventionally denoted
+Rust's grammar is defined over Unicode code points, each conventionally denoted
 `U+XXXX`, for 4 or more hexadecimal digits `X`. _Most_ of Rust's grammar is
 confined to the ASCII range of Unicode, and is described in this document by a
 dialect of Extended Backus-Naur Form (EBNF), specifically a dialect of EBNF
@@ -53,7 +53,7 @@ Where:
 - Square brackets are used to group rules.
 - `LITERAL` is a single printable ASCII character, or an escaped hexadecimal
   ASCII code of the form `\xQQ`, in single quotes, denoting the corresponding
-  Unicode codepoint `U+00QQ`.
+  Unicode code point `U+00QQ`.
 - `IDENTIFIER` is a nonempty string of ASCII letters and underscores.
 - The `repeat` forms apply to the adjacent `element`, and are as follows:
   - `?` means zero or one repetition
@@ -66,9 +66,9 @@ This EBNF dialect should hopefully be familiar to many readers.
 
 ## Unicode productions
 
-A few productions in Rust's grammar permit Unicode codepoints outside the ASCII
+A few productions in Rust's grammar permit Unicode code points outside the ASCII
 range. We define these productions in terms of character properties specified
-in the Unicode standard, rather than in terms of ASCII-range codepoints. The
+in the Unicode standard, rather than in terms of ASCII-range code points. The
 section [Special Unicode Productions](#special-unicode-productions) lists these
 productions.
 
@@ -91,10 +91,10 @@ production. See [tokens](#tokens) for more information.
 
 ## Input format
 
-Rust input is interpreted as a sequence of Unicode codepoints encoded in UTF-8.
+Rust input is interpreted as a sequence of Unicode code points encoded in UTF-8.
 Most Rust grammar rules are defined in terms of printable ASCII-range
-codepoints, but a small number are defined in terms of Unicode properties or
-explicit codepoint lists. [^inputformat]
+code points, but a small number are defined in terms of Unicode properties or
+explicit code point lists. [^inputformat]
 
 [^inputformat]: Substitute definitions for the special Unicode productions are
   provided to the grammar verifier, restricted to ASCII range, when verifying the
@@ -147,11 +147,13 @@ comments beginning with exactly one repeated asterisk in the block-open
 sequence (`/**`), are interpreted as a special syntax for `doc`
 [attributes](#attributes). That is, they are equivalent to writing
 `#[doc="..."]` around the body of the comment (this includes the comment
-characters themselves, ie `/// Foo` turns into `#[doc="/// Foo"]`).
+characters themselves, i.e. `/// Foo` turns into `#[doc="/// Foo"]`).
 
-`//!` comments apply to the parent of the comment, rather than the item that
-follows. `//!` comments are usually used to display information on the crate
-index page.
+Line comments beginning with `//!` and block comments beginning with `/*!` are
+doc comments that apply to the parent of the comment, rather than the item
+that follows.  That is, they are equivalent to writing `#![doc="..."]` around
+the body of the comment. `//!` comments are usually used to display
+information on the crate index page.
 
 Non-doc comments are interpreted as a form of whitespace.
 
@@ -196,10 +198,11 @@ grammar as double-quoted strings. Other tokens have exact rules given.
 | fn       | for      | if       | impl     | in      |
 | let      | loop     | macro    | match    | mod     |
 | move     | mut      | offsetof | override | priv    |
-| pub      | pure     | ref      | return   | sizeof  |
-| static   | self     | struct   | super    | true    |
-| trait    | type     | typeof   | unsafe   | unsized |
-| use      | virtual  | where    | while    | yield   |
+| proc     | pub      | pure     | ref      | return  |
+| Self     | self     | sizeof   | static   | struct  |
+| super    | trait    | true     | type     | typeof  |
+| unsafe   | unsized  | use      | virtual  | where   |
+| while    | yield    |          |          |         |
 
 
 Each of these keywords has special meaning in its grammar, and all of them are
@@ -330,14 +333,14 @@ Some additional _escapes_ are available in either character or non-raw string
 literals. An escape starts with a `U+005C` (`\`) and continues with one of the
 following forms:
 
-* An _8-bit codepoint escape_ escape starts with `U+0078` (`x`) and is
-  followed by exactly two _hex digits_. It denotes the Unicode codepoint
+* An _8-bit code point escape_ starts with `U+0078` (`x`) and is
+  followed by exactly two _hex digits_. It denotes the Unicode code point
   equal to the provided hex value.
-* A _24-bit codepoint escape_ starts with `U+0075` (`u`) and is followed
+* A _24-bit code point escape_ starts with `U+0075` (`u`) and is followed
   by up to six _hex digits_ surrounded by braces `U+007B` (`{`) and `U+007D`
-  (`}`). It denotes the Unicode codepoint equal to the provided hex value.
+  (`}`). It denotes the Unicode code point equal to the provided hex value.
 * A _whitespace escape_ is one of the characters `U+006E` (`n`), `U+0072`
-  (`r`), or `U+0074` (`t`), denoting the unicode values `U+000A` (LF),
+  (`r`), or `U+0074` (`t`), denoting the Unicode values `U+000A` (LF),
   `U+000D` (CR) or `U+0009` (HT) respectively.
 * The _backslash escape_ is the character `U+005C` (`\`) which must be
   escaped in order to denote *itself*.
@@ -407,7 +410,7 @@ Some additional _escapes_ are available in either byte or non-raw byte string
 literals. An escape starts with a `U+005C` (`\`) and continues with one of the
 following forms:
 
-* An _byte escape_ escape starts with `U+0078` (`x`) and is
+* A _byte escape_ escape starts with `U+0078` (`x`) and is
   followed by exactly two _hex digits_. It denotes the byte
   equal to the provided hex value.
 * A _whitespace escape_ is one of the characters `U+006E` (`n`), `U+0072`
@@ -697,9 +700,9 @@ in macro rules). In the transcriber, the designator is already known, and so
 only the name of a matched nonterminal comes after the dollar sign.
 
 In both the matcher and transcriber, the Kleene star-like operator indicates
-repetition. The Kleene star operator consists of `$` and parens, optionally
+repetition. The Kleene star operator consists of `$` and parentheses, optionally
 followed by a separator token, followed by `*` or `+`. `*` means zero or more
-repetitions, `+` means at least one repetition. The parens are not matched or
+repetitions, `+` means at least one repetition. The parentheses are not matched or
 transcribed. On the matcher side, a name is bound to _all_ of the names it
 matches, in a structure that mimics the structure of the repetition encountered
 on a successful match. The job of the transcriber is to sort that structure
@@ -1099,40 +1102,31 @@ signature. Each type parameter must be explicitly declared, in an
 angle-bracket-enclosed, comma-separated list following the function name.
 
 ```{.ignore}
-fn iter<T>(seq: &[T], f: |T|) {
-    for elt in seq.iter() { f(elt); }
+fn iter<T, F>(seq: &[T], f: F) where T: Copy, F: Fn(T) {
+    for elt in seq { f(*elt); }
 }
-fn map<T, U>(seq: &[T], f: |T| -> U) -> Vec<U> {
+fn map<T, U, F>(seq: &[T], f: F) -> Vec<U> where T: Copy, U: Copy, F: Fn(T) -> U {
     let mut acc = vec![];
-    for elt in seq.iter() { acc.push(f(elt)); }
+    for elt in seq { acc.push(f(*elt)); }
     acc
 }
 ```
 
 Inside the function signature and body, the name of the type parameter can be
-used as a type name.
+used as a type name. [Trait](#traits) bounds can be specified for type parameters
+to allow methods with that trait to be called on values of that type. This is
+specified using the `where` syntax, as in the above example.
 
 When a generic function is referenced, its type is instantiated based on the
 context of the reference. For example, calling the `iter` function defined
 above on `[1, 2]` will instantiate type parameter `T` with `i32`, and require
-the closure parameter to have type `fn(i32)`.
+the closure parameter to have type `Fn(i32)`.
 
 The type parameters can also be explicitly supplied in a trailing
 [path](#paths) component after the function name. This might be necessary if
 there is not sufficient context to determine the type parameters. For example,
 `mem::size_of::<u32>() == 4`.
 
-Since a parameter type is opaque to the generic function, the set of operations
-that can be performed on it is limited. Values of parameter type can only be
-moved, not copied.
-
-```
-fn id<T>(x: T) -> T { x }
-```
-
-Similarly, [trait](#traits) bounds can be specified for type parameters to
-allow methods with that trait to be called on values of that type.
-
 #### Unsafety
 
 Unsafe operations are those that potentially violate the memory-safety
@@ -1209,9 +1203,9 @@ the guarantee that these issues are never caused by safe code.
 
 [noalias]: http://llvm.org/docs/LangRef.html#noalias
 
-##### Behaviour not considered unsafe
+##### Behavior not considered unsafe
 
-This is a list of behaviour not considered *unsafe* in Rust terms, but that may
+This is a list of behavior not considered *unsafe* in Rust terms, but that may
 be undesired.
 
 * Deadlocks
@@ -1304,7 +1298,7 @@ specific type, but may implement several different traits, or be compatible with
 several different type constraints.
 
 For example, the following defines the type `Point` as a synonym for the type
-`(u8, u8)`, the type of pairs of unsigned 8 bit integers.:
+`(u8, u8)`, the type of pairs of unsigned 8 bit integers:
 
 ```
 type Point = (u8, u8);
@@ -1555,7 +1549,7 @@ fn draw_twice<T: Shape>(surface: Surface, sh: T) {
 }
 ```
 
-Traits also define an [object type](#object-types) with the same name as the
+Traits also define an [trait object](#trait-objects) with the same name as the
 trait. Values of this type are created by [casting](#type-cast-expressions)
 pointer values (pointing to a type for which an implementation of the given
 trait is in scope) to pointers to the trait name, used as a type.
@@ -1958,7 +1952,7 @@ type int8_t = i8;
 
 ### Crate-only attributes
 
-- `crate_name` - specify the this crate's crate name.
+- `crate_name` - specify the crate's crate name.
 - `crate_type` - see [linkage](#linkage).
 - `feature` - see [compiler features](#compiler-features).
 - `no_builtins` - disable optimizing certain code patterns to invocations of
@@ -2146,7 +2140,7 @@ The following configurations must be defined by the implementation:
   `"unix"` or `"windows"`. The value of this configuration option is defined
   as a configuration itself, like `unix` or `windows`.
 * `target_os = "..."`. Operating system of the target, examples include
-  `"win32"`, `"macos"`, `"linux"`, `"android"`, `"freebsd"`, `"dragonfly"`,
+  `"windows"`, `"macos"`, `"ios"`, `"linux"`, `"android"`, `"freebsd"`, `"dragonfly"`,
   `"bitrig"` or `"openbsd"`.
 * `target_pointer_width = "..."`. Target pointer width in bits. This is set
   to `"32"` for targets with 32-bit pointers, and likewise set to `"64"` for
@@ -2744,7 +2738,7 @@ A _method call_ consists of an expression followed by a single dot, an
 identifier, and a parenthesized expression-list. Method calls are resolved to
 methods on specific traits, either statically dispatching to a method if the
 exact `self`-type of the left-hand-side is known, or dynamically dispatching if
-the left-hand-side expression is an indirect [object type](#object-types).
+the left-hand-side expression is an indirect [trait object](#trait-objects).
 
 ### Field expressions
 
@@ -2812,6 +2806,33 @@ _panicked state_.
 (["a", "b"])[10]; // panics
 ```
 
+### Range expressions
+
+```{.ebnf .gram}
+range_expr : expr ".." expr |
+             expr ".." |
+             ".." expr |
+             ".." ;
+```
+
+The `..` operator will construct an object of one of the `std::ops::Range` variants.
+
+```
+1..2;   // std::ops::Range
+3..;    // std::ops::RangeFrom
+..4;    // std::ops::RangeTo
+..;     // std::ops::RangeFull
+```
+
+The following expressions are equivalent.
+
+```
+let x = std::ops::Range {start: 0, end: 10};
+let y = 0..10;
+
+assert_eq!(x,y);
+```
+
 ### Unary operator expressions
 
 Rust defines three unary operators. They are all written as prefix operators,
@@ -3078,28 +3099,6 @@ fn ten_times<F>(f: F) where F: Fn(i32) {
 ten_times(|j| println!("hello, {}", j));
 ```
 
-### While loops
-
-```{.ebnf .gram}
-while_expr : [ lifetime ':' ] "while" no_struct_literal_expr '{' block '}' ;
-```
-
-A `while` loop begins by evaluating the boolean loop conditional expression.
-If the loop conditional expression evaluates to `true`, the loop body block
-executes and control returns to the loop conditional expression. If the loop
-conditional expression evaluates to `false`, the `while` expression completes.
-
-An example:
-
-```
-let mut i = 0;
-
-while i < 10 {
-    println!("hello");
-    i = i + 1;
-}
-```
-
 ### Infinite loops
 
 A `loop` expression denotes an infinite loop.
@@ -3108,10 +3107,11 @@ A `loop` expression denotes an infinite loop.
 loop_expr : [ lifetime ':' ] "loop" '{' block '}';
 ```
 
-A `loop` expression may optionally have a _label_. If a label is present, 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
+A `loop` expression may optionally have a _label_. The label is written as
+a lifetime preceding the loop expression, as in `'foo: loop{ }`. If a
+label is present, 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
@@ -3123,7 +3123,7 @@ break_expr : "break" [ lifetime ];
 A `break` expression has an optional _label_. If the label is absent, then
 executing a `break` expression immediately terminates the innermost loop
 enclosing it. It is only permitted in the body of a loop. If the label is
-present, then `break foo` terminates the loop with label `foo`, which need not
+present, then `break 'foo` terminates the loop with label `'foo`, which need not
 be the innermost label enclosing the `break` expression, but must enclose it.
 
 ### Continue expressions
@@ -3137,12 +3137,39 @@ 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 `continue foo` returns
-control to the head of the loop with label `foo`, which need not be the
+controlling the loop. 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 `continue` expression is only permitted in the body of a loop.
 
+### While loops
+
+```{.ebnf .gram}
+while_expr : [ lifetime ':' ] "while" no_struct_literal_expr '{' block '}' ;
+```
+
+A `while` loop begins by evaluating the boolean loop conditional expression.
+If the loop conditional expression evaluates to `true`, the loop body block
+executes and control returns to the loop conditional expression. If the loop
+conditional expression evaluates to `false`, the `while` expression completes.
+
+An example:
+
+```
+let mut i = 0;
+
+while i < 10 {
+    println!("hello");
+    i = i + 1;
+}
+```
+
+Like `loop` expressions, `while` loops can be controlled with `break` or
+`continue`, and may optionally have a _label_. See [infinite
+loops](#infinite-loops), [break expressions](#break-expressions), and
+[continue expressions](#continue-expressions) for more information.
+
 ### For expressions
 
 ```{.ebnf .gram}
@@ -3177,6 +3204,11 @@ for i in 0..256 {
 }
 ```
 
+Like `loop` expressions, `for` loops can be controlled with `break` or
+`continue`, and may optionally have a _label_. See [infinite
+loops](#infinite-loops), [break expressions](#break-expressions), and
+[continue expressions](#continue-expressions) for more information.
+
 ### If expressions
 
 ```{.ebnf .gram}
@@ -3432,7 +3464,7 @@ is not a surrogate), represented as a 32-bit unsigned word in the 0x0000 to
 UTF-32 string.
 
 A value of type `str` is a Unicode string, represented as an array of 8-bit
-unsigned bytes holding a sequence of UTF-8 codepoints. Since `str` is of
+unsigned bytes holding a sequence of UTF-8 code points. Since `str` is of
 unknown size, it is not a _first-class_ type, but can only be instantiated
 through a pointer type, such as `&str` or `String`.
 
@@ -3649,23 +3681,23 @@ call_closure(closure_no_args, closure_args);
 
 ```
 
-### Object types
+### Trait objects
 
 Every trait item (see [traits](#traits)) defines a type with the same name as
-the trait. This type is called the _object type_ of the trait. Object types
+the trait. This type is called the _trait object_ of the trait. Trait objects
 permit "late binding" of methods, dispatched using _virtual method tables_
 ("vtables"). Whereas most calls to trait methods are "early bound" (statically
 resolved) to specific implementations at compile time, a call to a method on an
-object type is only resolved to a vtable entry at compile time. The actual
+trait objects is only resolved to a vtable entry at compile time. The actual
 implementation for each vtable entry can vary on an object-by-object basis.
 
 Given a pointer-typed expression `E` of type `&T` or `Box<T>`, where `T`
 implements trait `R`, casting `E` to the corresponding pointer type `&R` or
-`Box<R>` results in a value of the _object type_ `R`. This result is
+`Box<R>` results in a value of the _trait object_ `R`. This result is
 represented as a pair of pointers: the vtable pointer for the `T`
 implementation of `R`, and the pointer value of `E`.
 
-An example of an object type:
+An example of a trait object:
 
 ```
 trait Printable {
@@ -3685,7 +3717,7 @@ fn main() {
 }
 ```
 
-In this example, the trait `Printable` occurs as an object type in both the
+In this example, the trait `Printable` occurs as a trait object in both the
 type signature of `print`, and the cast expression in `main`.
 
 ### Type parameters
index 0edadeb628e8036bd6ead12e71797406af7f01a8..7ce74e86fef63450f2cd002d2aecec07a7dcd7eb 100644 (file)
@@ -7,7 +7,6 @@
 * [Learn Rust](learn-rust.md)
 * [Effective Rust](effective-rust.md)
     * [The Stack and the Heap](the-stack-and-the-heap.md)
-    * [Debug and Display](debug-and-display.md)
     * [Testing](testing.md)
     * [Conditional Compilation](conditional-compilation.md)
     * [Documentation](documentation.md)
diff --git a/src/doc/trpl/debug-and-display.md b/src/doc/trpl/debug-and-display.md
deleted file mode 100644 (file)
index 918f4c4..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-% Debug and Display
-
-Coming soon!
index 9fa870ab1ac7cf27796ffc56f77121e5cd3e15bf..9d01f104ddaafcdcb824ccf4241189c743667c58 100644 (file)
@@ -57,8 +57,7 @@ let x: Vec<u32> = {
 We can implement this shorthand, using a macro: [^actual]
 
 [^actual]: The actual definition of `vec!` in libcollections differs from the
-           one presented here, for reasons of efficiency and reusability. Some
-           of these are mentioned in the [advanced macros chapter][].
+           one presented here, for reasons of efficiency and reusability.
 
 ```rust
 macro_rules! vec {
@@ -106,7 +105,7 @@ These have [their own little grammar] within the language.
 
 The matcher `$x:expr` will match any Rust expression, binding that syntax tree
 to the â€˜metavariable’ `$x`. The identifier `expr` is a â€˜fragment specifier’;
-the full possibilities are enumerated in the [advanced macros chapter][].
+the full possibilities are enumerated later in this chapter.
 Surrounding the matcher with `$(...),*` will match zero or more expressions,
 separated by commas.
 
@@ -566,7 +565,7 @@ When this library is loaded with `#[macro_use] extern crate`, only `m2` will
 be imported.
 
 The Rust Reference has a [listing of macro-related
-attributes](../reference.html#macro--and-plugin-related-attributes).
+attributes](../reference.html#macro-related-attributes).
 
 # The variable `$crate`
 
index 554ca3ea539cbb9b1acf96297123ccb15988b5f1..9d7f9ea89908f21cab8ee01ca16c381028b2f38b 100644 (file)
@@ -675,7 +675,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<T: Default + Sync + Send> Default for Arc<T> {
+impl<T: Default> Default for Arc<T> {
     #[stable(feature = "rust1", since = "1.0.0")]
     fn default() -> Arc<T> { Arc::new(Default::default()) }
 }
index 685b3e5c546ddfb097edbf553ed2ae9e0e14a473..ec84ef7986a43b8b8c327954174c566ee6a90548 100644 (file)
@@ -80,7 +80,7 @@ fn clone(&self) -> Slice<T> { *self }
 /// `TraitObject` is guaranteed to match layouts, but it is not the
 /// type of trait objects (e.g. the fields are not directly accessible
 /// on a `&SomeTrait`) nor does it control that layout (changing the
-/// definition will not change the layout of a `&SometTrait`). It is
+/// definition will not change the layout of a `&SomeTrait`). It is
 /// only designed to be used by unsafe code that needs to manipulate
 /// the low-level details.
 ///
index 33ecc0ce205074b347f82d939949e5e66ce33266..182405a640dbcfb2d506607c6c6194f355c5c06e 100644 (file)
 into a variable called `op_string` while simultaneously requiring the inner
 String to be moved into a variable called `s`.
 
+```
 let x = Some("s".to_string());
 match x {
     op_string @ Some(s) => ...
     None => ...
 }
+```
 
 See also Error 303.
 "##,
 referenced in the pattern guard code. Doing so however would prevent the name
 from being available in the body of the match arm. Consider the following:
 
+```
 match Some("hi".to_string()) {
     Some(s) if s.len() == 0 => // use s.
     ...
 }
+```
 
 The variable `s` has type String, and its use in the guard is as a variable of
 type String. The guard code effectively executes in a separate scope to the body
 innocuous, the problem is most clear when considering functions that take their
 argument by value.
 
+```
 match Some("hi".to_string()) {
     Some(s) if { drop(s); false } => (),
     Some(s) => // use s.
     ...
 }
+```
 
 The value would be dropped in the guard then become unavailable not only in the
 body of that arm but also in all subsequent arms! The solution is to bind by
@@ -219,8 +225,10 @@ fn main() {
 You can build a free-standing crate by adding `#![no_std]` to the crate
 attributes:
 
+```
 #![feature(no_std)]
 #![no_std]
+```
 
 See also https://doc.rust-lang.org/book/no-stdlib.html
 "##,
@@ -236,11 +244,13 @@ fn main() {
 
 If you want to match against a `static`, consider using a guard instead:
 
+```
 static FORTY_TWO: i32 = 42;
 match Some(42) {
     Some(x) if x == FORTY_TWO => ...
     ...
 }
+```
 "##,
 
 E0161: r##"
@@ -256,6 +266,7 @@ fn main() {
 match was succesful. If the match is irrefutable (when it cannot fail to match),
 use a regular `let`-binding instead. For instance:
 
+```
 struct Irrefutable(i32);
 let irr = Irrefutable(0);
 
@@ -268,6 +279,7 @@ fn main() {
 // Try this instead:
 let Irrefutable(x) = irr;
 foo(x);
+```
 "##,
 
 E0165: r##"
@@ -275,6 +287,7 @@ fn main() {
 match was succesful. If the match is irrefutable (when it cannot fail to match),
 use a regular `let`-binding inside a `loop` instead. For instance:
 
+```
 struct Irrefutable(i32);
 let irr = Irrefutable(0);
 
@@ -288,22 +301,27 @@ fn main() {
     let Irrefutable(x) = irr;
     ...
 }
+```
 "##,
 
 E0170: r##"
 Enum variants are qualified by default. For example, given this type:
 
+```
 enum Method {
     GET,
     POST
 }
+```
 
 you would match it using:
 
+```
 match m {
     Method::GET => ...
     Method::POST => ...
 }
+```
 
 If you don't qualify the names, the code will bind new variables named "GET" and
 "POST" instead. This behavior is likely not what you want, so rustc warns when
@@ -312,8 +330,10 @@ enum Method {
 Qualified names are good practice, and most code works well with them. But if
 you prefer them unqualified, you can import the variants into scope:
 
+```
 use Method::*;
 enum Method { GET, POST }
+```
 "##,
 
 E0267: r##"
@@ -333,7 +353,9 @@ enum Method { GET, POST }
 This error indicates that the given recursion limit could not be parsed. Ensure
 that the value provided is a positive integer between quotes, like so:
 
+```
 #![recursion_limit="1000"]
+```
 "##,
 
 E0297: r##"
@@ -342,6 +364,7 @@ enum Method { GET, POST }
 loop variable, consider using a `match` or `if let` inside the loop body. For
 instance:
 
+```
 // This fails because `None` is not covered.
 for Some(x) in xs {
     ...
@@ -361,6 +384,7 @@ enum Method { GET, POST }
         ...
     }
 }
+```
 "##,
 
 E0301: r##"
@@ -370,11 +394,13 @@ enum Method { GET, POST }
 exhaustive. For instance, the following would not match any arm if mutable
 borrows were allowed:
 
+```
 match Some(()) {
     None => { },
     option if option.take().is_none() => { /* impossible, option is `Some` */ },
     Some(_) => { } // When the previous match failed, the option became `None`.
 }
+```
 "##,
 
 E0302: r##"
@@ -384,11 +410,13 @@ enum Method { GET, POST }
 exhaustive. For instance, the following would not match any arm if assignments
 were allowed:
 
+```
 match Some(()) {
     None => { },
     option if { option = None; false } { },
     Some(_) => { } // When the previous match failed, the option became `None`.
 }
+```
 "##,
 
 E0303: r##"
@@ -396,9 +424,10 @@ enum Method { GET, POST }
 Updates to the borrow checker in a future version of Rust may remove this
 restriction, but for now patterns must be rewritten without sub-bindings.
 
-// Before.
-match Some("hi".to_string()) {
-    ref op_string_ref @ Some(ref s) => ...
+```
+// Code like this...
+match Some(5) {
+    ref op_num @ Some(num) => ...
     None => ...
 }
 
@@ -410,6 +439,7 @@ enum Method { GET, POST }
     }
     None => ...
 }
+```
 
 The `op_string_ref` binding has type &Option<&String> in both cases.
 
index ed8a6fb0200a46a5bd9d0b2f7c734097b806e3fe..153ec0ab2b375c439226dd173b3a46c334f757d5 100644 (file)
@@ -532,11 +532,8 @@ pub fn evaluate_impl(&mut self,
                obligation.repr(self.tcx()));
 
         self.infcx.probe(|snapshot| {
-            let (skol_obligation_trait_ref, skol_map) =
-                self.infcx().skolemize_late_bound_regions(&obligation.predicate, snapshot);
-            match self.match_impl(impl_def_id, obligation, snapshot,
-                                  &skol_map, skol_obligation_trait_ref.trait_ref.clone()) {
-                Ok(substs) => {
+            match self.match_impl(impl_def_id, obligation, snapshot) {
+                Ok((substs, skol_map)) => {
                     let vtable_impl = self.vtable_impl(impl_def_id,
                                                        substs,
                                                        obligation.cause.clone(),
@@ -1160,10 +1157,7 @@ fn assemble_candidates_from_impls(&mut self,
         let all_impls = self.all_impls(def_id);
         for &impl_def_id in &all_impls {
             self.infcx.probe(|snapshot| {
-                let (skol_obligation_trait_pred, skol_map) =
-                    self.infcx().skolemize_late_bound_regions(&obligation.predicate, snapshot);
-                match self.match_impl(impl_def_id, obligation, snapshot,
-                                      &skol_map, skol_obligation_trait_pred.trait_ref.clone()) {
+                match self.match_impl(impl_def_id, obligation, snapshot) {
                     Ok(_) => {
                         candidates.vec.push(ImplCandidate(impl_def_id));
                     }
@@ -2115,11 +2109,9 @@ fn confirm_impl_candidate(&mut self,
         // First, create the substitutions by matching the impl again,
         // this time not in a probe.
         self.infcx.commit_if_ok(|snapshot| {
-            let (skol_obligation_trait_ref, skol_map) =
-                self.infcx().skolemize_late_bound_regions(&obligation.predicate, snapshot);
-            let substs =
+            let (substs, skol_map) =
                 self.rematch_impl(impl_def_id, obligation,
-                                  snapshot, &skol_map, skol_obligation_trait_ref.trait_ref);
+                                  snapshot);
             debug!("confirm_impl_candidate substs={}", substs.repr(self.tcx()));
             Ok(self.vtable_impl(impl_def_id, substs, obligation.cause.clone(),
                                 obligation.recursion_depth + 1, skol_map, snapshot))
@@ -2306,14 +2298,11 @@ fn confirm_poly_trait_refs(&mut self,
     fn rematch_impl(&mut self,
                     impl_def_id: ast::DefId,
                     obligation: &TraitObligation<'tcx>,
-                    snapshot: &infer::CombinedSnapshot,
-                    skol_map: &infer::SkolemizationMap,
-                    skol_obligation_trait_ref: Rc<ty::TraitRef<'tcx>>)
-                    -> Normalized<'tcx, Substs<'tcx>>
+                    snapshot: &infer::CombinedSnapshot)
+                    -> (Normalized<'tcx, Substs<'tcx>>, infer::SkolemizationMap)
     {
-        match self.match_impl(impl_def_id, obligation, snapshot,
-                              skol_map, skol_obligation_trait_ref) {
-            Ok(substs) => substs,
+        match self.match_impl(impl_def_id, obligation, snapshot) {
+            Ok((substs, skol_map)) => (substs, skol_map),
             Err(()) => {
                 self.tcx().sess.bug(
                     &format!("Impl {} was matchable against {} but now is not",
@@ -2326,10 +2315,9 @@ fn rematch_impl(&mut self,
     fn match_impl(&mut self,
                   impl_def_id: ast::DefId,
                   obligation: &TraitObligation<'tcx>,
-                  snapshot: &infer::CombinedSnapshot,
-                  skol_map: &infer::SkolemizationMap,
-                  skol_obligation_trait_ref: Rc<ty::TraitRef<'tcx>>)
-                  -> Result<Normalized<'tcx, Substs<'tcx>>, ()>
+                  snapshot: &infer::CombinedSnapshot)
+                  -> Result<(Normalized<'tcx, Substs<'tcx>>,
+                             infer::SkolemizationMap), ()>
     {
         let impl_trait_ref = ty::impl_trait_ref(self.tcx(), impl_def_id).unwrap();
 
@@ -2340,6 +2328,11 @@ fn match_impl(&mut self,
             return Err(());
         }
 
+        let (skol_obligation, skol_map) = self.infcx().skolemize_late_bound_regions(
+            &obligation.predicate,
+            snapshot);
+        let skol_obligation_trait_ref = skol_obligation.trait_ref;
+
         let impl_substs = util::fresh_type_vars_for_impl(self.infcx,
                                                          obligation.cause.span,
                                                          impl_def_id);
@@ -2370,17 +2363,17 @@ fn match_impl(&mut self,
             return Err(());
         }
 
-        if let Err(e) = self.infcx.leak_check(skol_map, snapshot) {
+        if let Err(e) = self.infcx.leak_check(&skol_map, snapshot) {
             debug!("match_impl: failed leak check due to `{}`",
                    ty::type_err_to_str(self.tcx(), &e));
             return Err(());
         }
 
         debug!("match_impl: success impl_substs={}", impl_substs.repr(self.tcx()));
-        Ok(Normalized {
+        Ok((Normalized {
             value: impl_substs,
             obligations: impl_trait_ref.obligations
-        })
+        }, skol_map))
     }
 
     fn fast_reject_trait_refs(&mut self,
index 3f3f8201b001954522144fbf331590b604589e55..1993f03efd1fabbc8e7539be2ec4b93f57fe9e55 100644 (file)
@@ -1460,7 +1460,7 @@ fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
         try!(write!(fmt, "<span class='out-of-band'>"));
         try!(write!(fmt,
         r##"<span id='render-detail'>
-            <a id="collapse-all" href="#">[-]</a>&nbsp;<a id="expand-all" href="#">[+]</a>
+            <a id="toggle-all-docs" href="#" title="collapse all docs">[-]</a>
         </span>"##));
 
         // Write `src` tag
@@ -1473,8 +1473,8 @@ fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
             match self.href(self.cx) {
                 Some(l) => {
                     try!(write!(fmt, "<a id='src-{}' class='srclink' \
-                                       href='{}'>[src]</a>",
-                                self.item.def_id.node, l));
+                                       href='{}' title='{}'>[src]</a>",
+                                self.item.def_id.node, l, "goto source code"));
                 }
                 None => {}
             }
index 0379c04be4d29746acf5329c71653aa4858f9db0..56cea50a502399cae7e4279f07eff6d2852b3c3f 100644 (file)
         window.location = $('.srclink').attr('href');
     }
 
-    $("#expand-all").on("click", function() {
-        $(".docblock").show();
-        $(".toggle-label").hide();
-        $(".toggle-wrapper").removeClass("collapsed");
-        $(".collapse-toggle").children(".inner").html("-");
-    });
-
-    $("#collapse-all").on("click", function() {
-        $(".docblock").hide();
-        $(".toggle-label").show();
-        $(".toggle-wrapper").addClass("collapsed");
-        $(".collapse-toggle").children(".inner").html("+");
+    $("#toggle-all-docs").on("click", function() {
+        var toggle = $("#toggle-all-docs");
+        if (toggle.html() == "[-]") {
+            toggle.html("[+]");
+            toggle.attr("title", "expand all docs");
+            $(".docblock").hide();
+            $(".toggle-label").show();
+            $(".toggle-wrapper").addClass("collapsed");
+            $(".collapse-toggle").children(".inner").html("+");
+        } else {
+            toggle.html("[-]");
+            toggle.attr("title", "collapse all docs");
+            $(".docblock").show();
+            $(".toggle-label").hide();
+            $(".toggle-wrapper").removeClass("collapsed");
+            $(".collapse-toggle").children(".inner").html("-");
+        }
     });
 
     $(document).on("click", ".collapse-toggle", function() {
         var toggle = $(this);
         var relatedDoc = toggle.parent().next();
+        if (relatedDoc.is(".stability")) {
+            relatedDoc = relatedDoc.next();
+        }
         if (relatedDoc.is(".docblock")) {
             if (relatedDoc.is(":visible")) {
                 relatedDoc.slideUp({duration:'fast', easing:'linear'});
             .html("[<span class='inner'>-</span>]");
 
         $(".method").each(function() {
-           if ($(this).next().is(".docblock")) {
-               $(this).children().first().after(toggle.clone());
-           }
+            if ($(this).next().is(".docblock") ||
+                ($(this).next().is(".stability") && $(this).next().next().is(".docblock"))) {
+                    $(this).children().first().after(toggle.clone());
+            }
         });
 
         var mainToggle =
index 8ca462f5a3870a41fd9c8471af830b371ef666a6..d0f990eaf782a5d0c25c17e74ba62e8fd7296334 100644 (file)
@@ -40,14 +40,6 @@ fn drop(&mut self) {
 }
 
 impl DynamicLibrary {
-    // FIXME (#12938): Until DST lands, we cannot decompose &str into
-    // & and str, so we cannot usefully take ToCStr arguments by
-    // reference (without forcing an additional & around &str). So we
-    // are instead temporarily adding an instance for &Path, so that
-    // we can take ToCStr as owned. When DST lands, the &Path instance
-    // should be removed, and arguments bound by ToCStr should be
-    // passed by reference. (Here: in the `open` method.)
-
     /// Lazily open a dynamic library. When passed None it gives a
     /// handle to the calling process
     pub fn open(filename: Option<&Path>) -> Result<DynamicLibrary, String> {
index cd6af77daa9061e00c094979d9bad3f64dc00c45..42fad701533b2b04ad1a228016738c8958c3e629 100644 (file)
@@ -95,6 +95,8 @@ fn flush(&mut self) -> io::Result<()> { Ok(()) }
 ///
 /// This handle implements the `Read` trait, but beware that concurrent reads
 /// of `Stdin` must be executed with care.
+///
+/// Created by the function `io::stdin()`.
 #[stable(feature = "rust1", since = "1.0.0")]
 pub struct Stdin {
     inner: Arc<Mutex<BufReader<StdinRaw>>>,
@@ -206,6 +208,8 @@ fn consume(&mut self, n: usize) { self.inner.consume(n) }
 /// Each handle shares a global buffer of data to be written to the standard
 /// output stream. Access is also synchronized via a lock and explicit control
 /// over locking is available via the `lock` method.
+///
+/// Created by the function `io::stdout()`.
 #[stable(feature = "rust1", since = "1.0.0")]
 pub struct Stdout {
     // FIXME: this should be LineWriter or BufWriter depending on the state of
index 422439fadc1a1b77255d220977b180936a6593f4..b3cc133d229465bf1a3a1b0bdfe988c800c1f02c 100644 (file)
@@ -306,6 +306,14 @@ pub struct Iter<'a, T: 'a> {
     rx: &'a Receiver<T>
 }
 
+/// An owning iterator over messages on a receiver, this iterator will block
+/// whenever `next` is called, waiting for a new message, and `None` will be
+/// returned when the corresponding channel has hung up.
+#[stable(feature = "receiver_into_iter", since = "1.1.0")]
+pub struct IntoIter<T> {
+    rx: Receiver<T>
+}
+
 /// The sending-half of Rust's asynchronous channel type. This half can only be
 /// owned by one task, but it can be cloned to send to other tasks.
 #[stable(feature = "rust1", since = "1.0.0")]
@@ -899,6 +907,29 @@ impl<'a, T> Iterator for Iter<'a, T> {
     fn next(&mut self) -> Option<T> { self.rx.recv().ok() }
 }
 
+#[stable(feature = "receiver_into_iter", since = "1.1.0")]
+impl<'a, T> IntoIterator for &'a Receiver<T> {
+    type Item = T;
+    type IntoIter = Iter<'a, T>;
+
+    fn into_iter(self) -> Iter<'a, T> { self.iter() }
+}
+
+impl<T> Iterator for IntoIter<T> {
+    type Item = T;
+    fn next(&mut self) -> Option<T> { self.rx.recv().ok() }
+}
+
+#[stable(feature = "receiver_into_iter", since = "1.1.0")]
+impl <T> IntoIterator for Receiver<T> {
+    type Item = T;
+    type IntoIter = IntoIter<T>;
+
+    fn into_iter(self) -> IntoIter<T> {
+        IntoIter { rx: self }
+    }
+}
+
 #[unsafe_destructor]
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T> Drop for Receiver<T> {
@@ -1507,6 +1538,32 @@ fn test_recv_iter_break() {
         assert_eq!(count_rx.recv().unwrap(), 4);
     }
 
+    #[test]
+    fn test_recv_into_iter_owned() {
+        let mut iter = {
+          let (tx, rx) = channel::<i32>();
+          tx.send(1).unwrap();
+          tx.send(2).unwrap();
+
+          rx.into_iter()
+        };
+        assert_eq!(iter.next().unwrap(), 1);
+        assert_eq!(iter.next().unwrap(), 2);
+        assert_eq!(iter.next().is_none(), true);
+    }
+
+    #[test]
+    fn test_recv_into_iter_borrowed() {
+        let (tx, rx) = channel::<i32>();
+        tx.send(1).unwrap();
+        tx.send(2).unwrap();
+        drop(tx);
+        let mut iter = (&rx).into_iter();
+        assert_eq!(iter.next().unwrap(), 1);
+        assert_eq!(iter.next().unwrap(), 2);
+        assert_eq!(iter.next().is_none(), true);
+    }
+
     #[test]
     fn try_recv_states() {
         let (tx1, rx1) = channel::<i32>();
index dc577f603f621903a1608f4b7edd1a9b2e87ecde..68006a8979a6468c702fe7d0497a869d830c9e52 100644 (file)
@@ -1151,8 +1151,8 @@ pub fn parse_trait_items(&mut self) -> PResult<Vec<P<TraitItem>>> {
             &token::CloseDelim(token::Brace),
             seq_sep_none(),
             |p| {
-            let lo = p.span.lo;
             let mut attrs = p.parse_outer_attributes();
+            let lo = p.span.lo;
 
             let (name, node) = if try!(p.eat_keyword(keywords::Type)) {
                 let TyParam {ident, bounds, default, ..} = try!(p.parse_ty_param());
@@ -3409,8 +3409,8 @@ fn check_expected_item(p: &mut Parser, attrs: &[Attribute]) {
             }
         }
 
-        let lo = self.span.lo;
         let attrs = self.parse_outer_attributes();
+        let lo = self.span.lo;
 
         Ok(Some(if self.check_keyword(keywords::Let) {
             check_expected_item(self, &attrs);
@@ -4304,8 +4304,8 @@ fn parse_item_fn(&mut self, unsafety: Unsafety, abi: abi::Abi) -> PResult<ItemIn
 
     /// Parse an impl item.
     pub fn parse_impl_item(&mut self) -> PResult<P<ImplItem>> {
-        let lo = self.span.lo;
         let mut attrs = self.parse_outer_attributes();
+        let lo = self.span.lo;
         let vis = try!(self.parse_visibility());
         let (name, node) = if try!(self.eat_keyword(keywords::Type)) {
             let name = try!(self.parse_ident());
@@ -5380,9 +5380,8 @@ fn parse_item_(&mut self, attrs: Vec<Attribute>,
 
     /// Parse a foreign item.
     fn parse_foreign_item(&mut self) -> PResult<Option<P<ForeignItem>>> {
-        let lo = self.span.lo;
-
         let attrs = self.parse_outer_attributes();
+        let lo = self.span.lo;
         let visibility = try!(self.parse_visibility());
 
         if self.check_keyword(keywords::Static) {
index 7a362994b8db6fe6948a3cd8bfef77b0e324118b..396b1c1de3aa0e735bb108f89a28ad6c1fc339cc 100644 (file)
@@ -11,7 +11,6 @@
 // aux-build:rlib_crate_test.rs
 // ignore-stage1
 // ignore-tidy-linelength
-// ignore-android
 // ignore-cross-compile gives a different error message
 
 #![feature(plugin)]
index 68a6a5fbfe86425d49b1e9892427bce94c43b174..dc0fcec1980fd1f18ad85d728f7ef0dbcb998419 100644 (file)
@@ -27,7 +27,8 @@ define MK_TARGETS
 # on some platforms, but LLVM just prints a warning so that's fine for
 # now.
 $(1): simd.rs
-       $$(RUSTC) --target=$(1) --emit=llvm-ir,asm simd.rs -C target-feature='+neon,+sse2'
+       $$(RUSTC) --target=$(1) --emit=llvm-ir,asm simd.rs \
+                -C target-feature='+neon,+sse2' -C extra-filename=-$(1)
 endef
 
 $(foreach targetxxx,$(TARGETS),$(eval $(call MK_TARGETS,$(targetxxx))))
index 4bacde0aadf3fc67fed7a79fbef5e90361342828..1cf36dab395fd3f1091014239be44fa40264d3b5 100644 (file)
@@ -10,7 +10,7 @@
 
 // Test that the CompilerCalls interface to the compiler works.
 
-// ignore-android
+// ignore-cross-compile
 
 #![feature(rustc_private, path)]
 #![feature(core)]
index e4fb7c199094722d2987568c42f5fcbe08c8528e..e22736d77856a266fecb7e9b211214d3f4f3d1e5 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-android
+// ignore-cross-compile
 
 #![feature(rustc_private)]
 
index 7e64bbdf703b7911dee91dc0173d2f995d1cfeb5..ea7e959a73ce82dc5605e58c76eaf09dd6d8e45d 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // no-prefer-dynamic
-// ignore-android
+// ignore-cross-compile
 
 #![feature(rustc_private)]
 
index 40947b2e25652fd3e494fe91309a0110bfdfb1c6..a439e2bb25b8c4df6b61dd223b6bb27c05f733da 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // ignore-pretty
-// ignore-android
+// ignore-cross-compile
 
 #![feature(quote, rustc_private)]
 
index e1ef32b64d7152c4f8baecfd545cb393ae46a94f..829fdb176bd3198ef38a3d9c3d76b131a068c1bd 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-android
+// ignore-cross-compile
 // ignore-pretty: does not work well with `--test`
 
 #![feature(quote, rustc_private)]
index 7e11b9d9f278956289aca857a8ba66e4e0a7adbb..710b3b07549f9e11b6216ad2312dddc2a782e6c4 100644 (file)
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+// ignore-cross-compile
 // ignore-pretty
 // ignore-test
 
index 99e0333ee29856f52ce5af6651d1019fcb67e02c..64061eb09324794ec1bc7de892bf329eb2207820 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-android
+// ignore-cross-compile
 // ignore-pretty: does not work well with `--test`
 
 #![feature(quote, rustc_private)]
index 928368fabdf3684dde673bca6478dce74e612d05..e9de95b95e5fd0cb1c47a519611fc94dd455d8c2 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-android
+// ignore-cross-compile
 // ignore-pretty: does not work well with `--test`
 
 #![feature(quote, rustc_private)]
index a0644e513a6e9727c5e988b31f961f953a9b9074..2bec41f3ee040d7dfb8cb33d912d8292b30dc881 100644 (file)
@@ -11,7 +11,7 @@
 // This test can't be a unit test in std,
 // because it needs TempDir, which is in extra
 
-// ignore-android
+// ignore-cross-compile
 
 #![feature(rustc_private, path_ext)]
 
index 92b243140021d26004cf22eda29972f79ec99cbd..6153a3966342c03aec62431869e2bb82343b379a 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // aux-build:rustdoc-default-impl.rs
-// ignore-android
+// ignore-cross-compile
 
 extern crate rustdoc_default_impl as foo;
 
index 9178c1bcb9d76d56b65755ec191b8909669d5c41..10d2884ebae0771646f60cd5ef6605c71d89ee18 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // aux-build:rustdoc-extern-default-method.rs
-// ignore-android
+// ignore-cross-compile
 
 extern crate rustdoc_extern_default_method as ext;
 
index 5e30e6c0c1c58a008651bd2414062f012ed5df17..c422871867d5d83ddf8eeb79909897bcd9a84ad7 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // aux-build:rustdoc-extern-method.rs
-// ignore-android
+// ignore-cross-compile
 
 #![feature(unboxed_closures)]
 
index 717c64b3aa54667cf841c79af8c25310c24700cb..3997dcd81e153e75a20cb5a7fc2a5447e59ce788 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // aux-build:rustdoc-ffi.rs
-// ignore-android
+// ignore-cross-compile
 
 extern crate rustdoc_ffi as lib;
 
index a613736ab4c500bed8e419a9253836fba51ca8d4..055af0160f54cdbd7def4aadd6d116d50bb5894b 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // aux-build:inline-default-methods.rs
-// ignore-android
+// ignore-cross-compile
 
 extern crate inline_default_methods;
 
index 5c31c297724649f8cbb95b547e8635a62868c9e5..cf9b30a0fe9873a46f96eade6c92126fea358e79 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // aux-build:issue-13698.rs
-// ignore-android
+// ignore-cross-compile
 
 extern crate issue_13698;
 
index 32898d652f8217fb112d6dce6b5acb4ae7b0e791..7999af46eebb6b5d88b85d80b828916edf3697ba 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // aux-build:issue-15318.rs
-// ignore-android
+// ignore-cross-compile
 
 extern crate issue_15318;
 
index 3bcc8f45b0e88338009deb0e5e709a5e1628dd80..fd46b6e990962d37e81f6a53a012a03a2ee68f83 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // aux-build:issue-15318.rs
-// ignore-android
+// ignore-cross-compile
 
 #![feature(no_std)]
 #![no_std]
index 8d31a1c288eb8d097d53eb9916ffefe4b2b5e816..dcd3f2a2ba5b8e5afc44139338a28a4333d2f8b6 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // aux-build:issue-17476.rs
-// ignore-android
+// ignore-cross-compile
 
 extern crate issue_17476;
 
index c315ea26d264291f3ec4a8641c1dc3797d2afc04..eec5c0253773720b42574accfed97994efb26cde 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // aux-build:issue-19190-3.rs
-// ignore-android
+// ignore-cross-compile
 
 extern crate issue_19190_3;
 
index 77abe35948c3de259726a6f80e855f957b9ad984..87c40d11579747af3090c46240593c38ac0523e1 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // aux-build:issue-20646.rs
-// ignore-android
+// ignore-cross-compile
 
 #![feature(associated_types)]
 
index 03181bebdb05a187c08d43ee9290ae5deb59b2d6..1f29a9c97972c6986d24bc62781d1b1b6b863458 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // aux-build:issue-20727.rs
-// ignore-android
+// ignore-cross-compile
 
 extern crate issue_20727;
 
index 9d05ce99c4d3034908cc52f71e576ff9a54b66d2..e4a9dd7e7f142b1c9217404374c7051bcc9b5ccb 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // aux-build:issue-20727.rs
-// ignore-android
+// ignore-cross-compile
 
 extern crate issue_20727;
 
index 39db387f090003ebe6696b173b3d8a0d5d646264..9ebd1c448eeb0d4195479782b9e066531b043188 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // aux-build:issue-20727.rs
-// ignore-android
+// ignore-cross-compile
 
 extern crate issue_20727;
 
index 3205f5bfa33715ff2d6bb5d6dbd8e67146c7d6cb..e38f06c4b317ac30d5bdc65d4d8f369c3dafc3ff 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // aux-build:issue-20727.rs
-// ignore-android
+// ignore-cross-compile
 
 extern crate issue_20727;
 
index 38983aee93397de586152071a1ebba5c4799a768..745c6e2c6648da6822f4e6f6960e1b49e787cf69 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // aux-build:issue-21092.rs
-// ignore-android
+// ignore-cross-compile
 
 extern crate issue_21092;
 
index a4392b84e5b12ab89e2a30b48a5f727000f2b729..4e2c77826b6c07d2fae90280d23f5139831753c2 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // aux-build:issue-21801.rs
-// ignore-android
+// ignore-cross-compile
 
 extern crate issue_21801;
 
index d2eb4fb6ad845559e3f4b74c8ce497b4960d487d..c0e4e673f94d8d7178333714fc20d14cdc594ba7 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // aux-build:issue-22025.rs
-// ignore-android
+// ignore-cross-compile
 
 extern crate issue_22025;
 
index 722046723be7c4e96d1461755cc5ffd31e402f39..4931d158ac3e4277a3b50b7fbc2f34ad25702032 100644 (file)
@@ -10,7 +10,7 @@
 
 // aux-build:issue-23207-1.rs
 // aux-build:issue-23207-2.rs
-// ignore-android
+// ignore-cross-compile
 
 extern crate issue_23207_2;