Auto merge of #25560 - Manishearth:rollup, r=Manishearth

- Successful merges: #25526, #25530, #25537
- Failed merges:
This commit is contained in:
bors 2015-05-18 04:41:43 +00:00
commit 84b1e08486
3 changed files with 8 additions and 8 deletions

View File

@ -54,9 +54,9 @@ The second is that the syntax is similar, but a bit different. Ive added spac
here to make them look a little closer:
```rust
fn plus_one_v1 (x: i32 ) -> i32 { x + 1 }
let plus_one_v2 = |x: i32 | -> i32 { x + 1 };
let plus_one_v3 = |x: i32 | x + 1 ;
fn plus_one_v1 (x: i32) -> i32 { x + 1 }
let plus_one_v2 = |x: i32| -> i32 { x + 1 };
let plus_one_v3 = |x: i32| x + 1 ;
```
Small differences, but theyre similar in ways.
@ -352,7 +352,7 @@ error: the trait `core::marker::Sized` is not implemented for the type
factory() -> (Fn(i32) -> Vec<i32>) {
^~~~~~~~~~~~~~~~~~~~~
note: `core::ops::Fn(i32) -> collections::vec::Vec<i32>` does not have a constant size known at compile-time
fa ctory() -> (Fn(i32) -> Vec<i32>) {
factory() -> (Fn(i32) -> Vec<i32>) {
^~~~~~~~~~~~~~~~~~~~~
```

View File

@ -297,7 +297,7 @@ We cant modify `v` because its borrowed by the loop.
References must live as long as the resource they refer to. Rust will check the
scopes of your references to ensure that this is true.
If Rust didnt check that this property, we could accidentally use a reference
If Rust didnt check this property, we could accidentally use a reference
which was invalid. For example:
```rust,ignore

View File

@ -111,7 +111,7 @@ fn parse_token_list(file: &str) -> HashMap<String, token::Token> {
"LIT_BINARY_RAW" => token::Literal(token::BinaryRaw(Name(0), 0), None),
"QUESTION" => token::Question,
"SHEBANG" => token::Shebang(Name(0)),
_ => panic!("Bad token str `{}`", val),
_ => continue,
};
res.insert(num.to_string(), tok);