- 04 10月, 2014 18 次提交
-
-
由 Björn Steinbrink 提交于
-
由 bors 提交于
Hopefully unblocks a snapshot
-
由 bors 提交于
Hi, These are a few small edits to the Guide that I made while reading online. Really well done and approachable. I have a few questions below, but I don't know if this is the proper place to ask them, so feel free to ignore the below. 1. Trailing commas seem to be a convention in Rust and are used quite a bit throughout the Guide, but are never explicitly mentioned. Maybe adding a short mention about them when they first appear in the Structs section might be helpful to those who are unfamiliar with or don't use them in other languages. 2. In the Iterators section, there is a block of code like this: ```rust let mut range = range(0i, 10i); loop { match range.next() { Some(x) => { println!("{}", x); } // no comma needed? None => { break } } } ``` My inclination would be to put a comma where the comment is to separate the two arms to get this to compile, but it runs fine either way. Is there a convention on commas for scenarios like this where each arm is enclosed in `{}`? All the best, O-I
-
由 bors 提交于
`v.len()` counts code units, not UTF-16 bytes. The lower bound is one UTF-8 byte per code unit, not per two code units. I believe this is correct, but it’s late. Someone please double check.
-
由 bors 提交于
This began as an attempt to fix an ICE in borrowck (issue #17655), but the rabbit hole went pretty deep. I ended up plumbing support for capture-by-reference unboxed closures all the way into trans. Closes issue #17655.
-
由 Alex Crichton 提交于
Hopefully unblocks a snapshot
-
由 bors 提交于
-
由 Rahul Horé 提交于
Oddly (to me), this code runs fine without the comma separating the `Some` and `None` arms of the `match` construct. It seems like Rust doesn't require you to separate arms with commas if all the expressions are enclosed in braces.
-
由 Simon Sapin 提交于
`v.len()` counts code units, not UTF-16 bytes. The lower bound is one UTF-8 byte per code unit, not per two code units.
-
由 Rahul Horé 提交于
-
由 Rahul Horé 提交于
-
由 Rahul Horé 提交于
-
由 bors 提交于
Trying to get a couple of these into the next snapshot.
-
由 Alex Crichton 提交于
-
由 Rahul Horé 提交于
See issue #17672. This was started in commit ee1cbb9c, but there were a few more lines to update.
-
由 Rahul Horé 提交于
-
由 Rahul Horé 提交于
-
由 Rahul Horé 提交于
-
- 03 10月, 2014 22 次提交
-
-
由 Steve Klabnik 提交于
-
由 Alex Crichton 提交于
-
由 Alex Crichton 提交于
-
由 Alex Crichton 提交于
-
由 Alex Crichton 提交于
-
由 Alex Crichton 提交于
-
由 Alex Crichton 提交于
-
由 Alex Crichton 提交于
I ended up botching the merge when making the rollup, and the fix was to just not configure LLVM all via --llvm-root with a nonexistent path.
-
由 Eduard Burtescu 提交于
-
由 Eduard Burtescu 提交于
-
由 Brian Koropoff 提交于
-
由 P1start 提交于
Closes #17337.
-
由 P1start 提交于
-
由 P1start 提交于
Closes #15657.
-
由 P1start 提交于
Closes #15914.
-
由 P1start 提交于
-
由 P1start 提交于
-
由 P1start 提交于
-
由 bors 提交于
@steveklabnik, are you interested in looking this over?
-
由 bors 提交于
-
由 Brian Koropoff 提交于
This test works as a regression test for issue #17655. It also exercises mutation of by-ref upvars.
-
由 Brian Koropoff 提交于
Store references to the freevars instead of copies when constructing the environment and insert an additional load when reading them from the environment.
-