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 #19665

Merged
merged 51 commits into from
Dec 9, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
e1b77b0
fix 404
nhoss2 Dec 5, 2014
7bf7bd6
work around portability issue on FreeBSD, in which the key returned from
aidancully Dec 5, 2014
c394a6c
prefer "FIXME" to "TODO".
aidancully Dec 5, 2014
8ebc1c9
librustc: Fix debuginfo for captured variables in non-FnOnce unboxed …
luqmana Dec 5, 2014
363ed2f
Correct minor typos on the ownership guide.
MattWindsor91 Dec 6, 2014
796e4b8
Typo
mdinger Dec 6, 2014
e852419
Feature-gate explicit unboxed closure method calls & manual impls,
huonw Dec 5, 2014
b800ce1
Implement lifetime elision for Foo(...) -> ... type sugar.
huonw Dec 6, 2014
9cb26e2
Add a doctest for BTreeMap's iter method.
jbranchaud Dec 6, 2014
de8f48b
- Support gcc-less installation on Windows. To do so in unattended m…
vadimcn Dec 6, 2014
87424c6
Fix false positive alerts from a run-pass test on Command.
nodakai Dec 6, 2014
2171c95
Add missing semicolon to hello world program in intro.
jbranchaud Dec 6, 2014
8ba5605
remove usage of notrust from the docs
steveklabnik Dec 7, 2014
131f202
Correct the reference with regards to floats
steveklabnik Dec 7, 2014
e294772
Add enum namespacing to the Guide.
steveklabnik Dec 7, 2014
58f1274
Make MemoryMap use HANDLE on Windows.
retep998 Dec 7, 2014
c8bd9d2
Remove mention of Dequeue in collections docs.
steveklabnik Dec 7, 2014
d7d5ccf
string: Use the iterator size_hint() in .extend()
Dec 7, 2014
5ba7c5d
string: Implement FromIterator<&str> and Extend<&str> for String
Dec 7, 2014
8dcdd1e
syntax: use UFCS in the expansion of `#[deriving(Ord)]`
Dec 6, 2014
56c4e97
string: Add test for FromIterator<char> and Extend<char>
Dec 7, 2014
a813469
string: Add test for FromIterator<&str> and Extend<&str>
Dec 7, 2014
956c581
documentation incorrectly described from_utf8
rustyrazorblade Dec 7, 2014
ad7dacd
Implemented BorrowFrom<Rc<T>> for T.
aatxe Dec 8, 2014
9af324a
Remove Result and Option reexports
frewsxcv Dec 8, 2014
553ab27
serialize: base64: allow LF in addition to CRLF and optimize slightly
Arcterus Dec 6, 2014
a943a7a
serialize: base64: improve newline handling speed
Arcterus Dec 6, 2014
a119ad8
serialize: base64: remove some .as_bytes() from the tests
Arcterus Dec 9, 2014
a09632f
rollup merge of #19576: nhoss2/master
alexcrichton Dec 9, 2014
39b5711
rollup merge of #19577: aidancully/master
alexcrichton Dec 9, 2014
2593070
rollup merge of #19581: luqmana/duc
alexcrichton Dec 9, 2014
6a652cf
rollup merge of #19584: CaptainHayashi/patch-1
alexcrichton Dec 9, 2014
60f97fc
rollup merge of #19585: mdinger/guide_typo
alexcrichton Dec 9, 2014
26c2422
rollup merge of #19587: huonw/closure-feature-gate
alexcrichton Dec 9, 2014
356193b
rollup merge of #19588: nodakai/libstd-fix-zombie-children-finder
alexcrichton Dec 9, 2014
63ef9e9
rollup merge of #19589: huonw/unboxed-closure-elision
alexcrichton Dec 9, 2014
ae60f9c
rollup merge of #19592: jbranchaud/add-btreemap-iter-doctest
alexcrichton Dec 9, 2014
d0ad3c7
rollup merge of #19594: Arcterus/master
alexcrichton Dec 9, 2014
2a244ce
rollup merge of #19598: japaric/ord
alexcrichton Dec 9, 2014
c56344b
rollup merge of #19604: vadimcn/gcc-less
alexcrichton Dec 9, 2014
ae805da
rollup merge of #19608: jbranchaud/add-missing-semicolon-in-intro
alexcrichton Dec 9, 2014
fb587f1
rollup merge of #19614: steveklabnik/gh19599
alexcrichton Dec 9, 2014
e6d8190
rollup merge of #19615: steveklabnik/gh19595
alexcrichton Dec 9, 2014
a2e9c99
rollup merge of #19616: steveklabnik/gh19556
alexcrichton Dec 9, 2014
4a49912
rollup merge of #19620: retep998/memorymap
alexcrichton Dec 9, 2014
21e5efb
rollup merge of #19622: steveklabnik/fix_ringbuf_doc
alexcrichton Dec 9, 2014
1cbb075
rollup merge of #19623: rustyrazorblade/patch-1
alexcrichton Dec 9, 2014
4b34f3c
rollup merge of #19626: bluss/string-extend-str
alexcrichton Dec 9, 2014
b4b1bb0
rollup merge of #19642: aaronweiss74/master
alexcrichton Dec 9, 2014
2457375
rollup merge of #19653: frewsxcv/rm-reexports
alexcrichton Dec 9, 2014
1a61fe4
Test fixes and rebase conflicts from the rollup
alexcrichton Dec 9, 2014
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
5 changes: 3 additions & 2 deletions mk/dist.mk
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,16 @@ PKG_EXE = dist/$(PKG_NAME)-$(CFG_BUILD).exe
$(PKG_EXE): rust.iss modpath.iss upgrade.iss LICENSE.txt rust-logo.ico \
$(CSREQ3_T_$(CFG_BUILD)_H_$(CFG_BUILD)) \
dist-prepare-win
$(CFG_PYTHON) $(S)src/etc/make-win-dist.py tmp/dist/win $(CFG_BUILD)
$(Q)rm -rf tmp/dist/win/gcc
$(CFG_PYTHON) $(S)src/etc/make-win-dist.py tmp/dist/win/rust tmp/dist/win/gcc $(CFG_BUILD)
@$(call E, ISCC: $@)
$(Q)$(CFG_ISCC) $<

$(eval $(call DEF_PREPARE,win))

dist-prepare-win: PREPARE_HOST=$(CFG_BUILD)
dist-prepare-win: PREPARE_TARGETS=$(CFG_BUILD)
dist-prepare-win: PREPARE_DEST_DIR=tmp/dist/win
dist-prepare-win: PREPARE_DEST_DIR=tmp/dist/win/rust
dist-prepare-win: PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
dist-prepare-win: PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
dist-prepare-win: PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
Expand Down
16 changes: 8 additions & 8 deletions src/doc/guide-crates.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ two languages for those phrases to be in. We'll use this module layout:
+---------+ | +-----------+
| +---| farewells |
+---------+ | +-----------+
| phrases |---+
| phrases |---+
+---------+ | +-----------+
| +---| greetings |
+----------+ | +-----------+
Expand Down Expand Up @@ -219,7 +219,7 @@ Put this in `src/english/greetings.rs`:

fn hello() -> String {
"Hello!".to_string()
}
}
```

Put this in `src/english/farewells.rs`:
Expand All @@ -229,7 +229,7 @@ Put this in `src/english/farewells.rs`:

fn goodbye() -> String {
"Goodbye.".to_string()
}
}
```

Put this in `src/japanese/greetings.rs`:
Expand All @@ -239,7 +239,7 @@ Put this in `src/japanese/greetings.rs`:

fn hello() -> String {
"こんにちは".to_string()
}
}
```

Of course, you can copy and paste this from this web page, or just type
Expand All @@ -253,7 +253,7 @@ Put this in `src/japanese/farewells.rs`:

fn goodbye() -> String {
"さようなら".to_string()
}
}
```

(This is "Sayoonara", if you're curious.)
Expand Down Expand Up @@ -381,11 +381,11 @@ $ cargo run
/home/you/projects/phrases/src/japanese/greetings.rs:1:1: 3:2 warning: code is never used: `hello`, #[warn(dead_code)] on by default
/home/you/projects/phrases/src/japanese/greetings.rs:1 fn hello() -> String {
/home/you/projects/phrases/src/japanese/greetings.rs:2 "こんにちは".to_string()
/home/you/projects/phrases/src/japanese/greetings.rs:3 }
/home/you/projects/phrases/src/japanese/greetings.rs:3 }
/home/you/projects/phrases/src/japanese/farewells.rs:1:1: 3:2 warning: code is never used: `goodbye`, #[warn(dead_code)] on by default
/home/you/projects/phrases/src/japanese/farewells.rs:1 fn goodbye() -> String {
/home/you/projects/phrases/src/japanese/farewells.rs:2 "さようなら".to_string()
/home/you/projects/phrases/src/japanese/farewells.rs:3 }
/home/you/projects/phrases/src/japanese/farewells.rs:3 }
Running `target/phrases`
Hello in English: Hello!
Goodbye in English: Goodbye.
Expand Down Expand Up @@ -452,7 +452,7 @@ fn main() {

Rust will give us a compile-time error:

```{notrust,ignore}
```{notrust}
Compiling phrases v0.0.1 (file:///home/you/projects/phrases)
/home/you/projects/phrases/src/main.rs:4:5: 4:40 error: a value named `hello` has already been imported in this module
/home/you/projects/phrases/src/main.rs:4 use phrases::japanese::greetings::hello;
Expand Down
6 changes: 3 additions & 3 deletions src/doc/guide-error-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> The best-laid plans of mice and men
> Often go awry
>
>
> "Tae a Moose", Robert Burns

Sometimes, things just go wrong. It's important to have a plan for when the
Expand Down Expand Up @@ -76,7 +76,7 @@ fn main() {

This will give us an error:

```{notrust,ignore}
```{notrust}
error: non-exhaustive patterns: `_` not covered [E0004]
```

Expand Down Expand Up @@ -189,7 +189,7 @@ panic!("boom");

gives

```{notrust,ignore}
```{notrust}
task '<main>' panicked at 'boom', hello.rs:2
```

Expand Down
18 changes: 9 additions & 9 deletions src/doc/guide-ownership.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ must have a deallocation for each allocation. Rust handles this for you. It
knows that our handle, `x`, is the owning reference to our box. Rust knows that
`x` will go out of scope at the end of the block, and so it inserts a call to
deallocate the memory at the end of the scope. Because the compiler does this
for us, it's impossible to forget. We always exaclty one deallocations paired
for us, it's impossible to forget. We always have exactly one deallocation paired
with each of our allocations.

This is pretty straightforward, but what happens when we want to pass our box
Expand Down Expand Up @@ -130,7 +130,7 @@ fn add_one(mut num: Box<int>) {

This does not compile, and gives us an error:

```{notrust,ignore}
```{notrust}
error: use of moved value: `x`
println!("{}", x);
^
Expand Down Expand Up @@ -186,11 +186,11 @@ This function takes ownership, because it takes a `Box`, which owns its
contents. But then we give ownership right back.

In the physical world, you can give one of your possessions to someone for a
short period of time. You still own your posession, you're just letting someone
short period of time. You still own your possession, you're just letting someone
else use it for a while. We call that 'lending' something to someone, and that
person is said to be 'borrowing' that something from you.

Rust's ownershp system also allows an owner to lend out a handle for a limited
Rust's ownership system also allows an owner to lend out a handle for a limited
period. This is also called 'borrowing.' Here's a version of `add_one` which
borrows its argument rather than taking ownership:

Expand Down Expand Up @@ -231,7 +231,7 @@ fn add_one(num: &int) -> int {

Rust has a feature called 'lifetime elision,' which allows you to not write
lifetime annotations in certain circumstances. This is one of them. Without
eliding the liftimes, `add_one` looks like this:
eliding the lifetimes, `add_one` looks like this:

```rust
fn add_one<'a>(num: &'a int) -> int {
Expand All @@ -254,7 +254,7 @@ This part _declares_ our lifetimes. This says that `add_one` has one lifetime,
fn add_two<'a, 'b>(...)
```

Then in our parameter list, we use the liftimes we've named:
Then in our parameter list, we use the lifetimes we've named:

```{rust,ignore}
...(num: &'a int) -> ...
Expand All @@ -279,7 +279,7 @@ fn main() {
}
```

As you can see, `struct`s can also have liftimes. In a similar way to functions,
As you can see, `struct`s can also have lifetimes. In a similar way to functions,

```{rust}
struct Foo<'a> {
Expand All @@ -295,7 +295,7 @@ x: &'a int,
# }
```

uses it. So why do we need a liftime here? We need to ensure that any reference
uses it. So why do we need a lifetime here? We need to ensure that any reference
to a `Foo` cannot outlive the reference to an `int` it contains.

## Thinking in scopes
Expand Down Expand Up @@ -406,7 +406,7 @@ fn main() {
We try to make four `Wheel`s, each with a `Car` that it's attached to. But the
compiler knows that on the second iteration of the loop, there's a problem:

```{notrust,ignore}
```{notrust}
error: use of moved value: `car`
Wheel { size: 360, owner: car };
^~~
Expand Down
18 changes: 9 additions & 9 deletions src/doc/guide-pointers.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ println!("{}", x + z);

This gives us an error:

```{notrust,ignore}
```{notrust}
hello.rs:6:24: 6:25 error: mismatched types: expected `int` but found `&int` (expected int but found &-ptr)
hello.rs:6 println!("{}", x + z);
^
Expand Down Expand Up @@ -132,7 +132,7 @@ Pointers are useful in languages that are pass-by-value, rather than
pass-by-reference. Basically, languages can make two choices (this is made
up syntax, it's not Rust):

```{notrust,ignore}
```{ignore}
func foo(x) {
x = 5
}
Expand All @@ -152,7 +152,7 @@ and therefore, can change its value. At the comment, `i` will be `5`.
So what do pointers have to do with this? Well, since pointers point to a
location in memory...

```{notrust,ignore}
```{ignore}
func foo(&int x) {
*x = 5
}
Expand All @@ -179,7 +179,7 @@ but here are problems with pointers in other languages:
Uninitialized pointers can cause a problem. For example, what does this program
do?

```{notrust,ignore}
```{ignore}
&int x;
*x = 5; // whoops!
```
Expand All @@ -191,7 +191,7 @@ knows. This might be harmless, and it might be catastrophic.
When you combine pointers and functions, it's easy to accidentally invalidate
the memory the pointer is pointing to. For example:

```{notrust,ignore}
```{ignore}
func make_pointer(): &int {
x = 5;

Expand All @@ -213,7 +213,7 @@ As one last example of a big problem with pointers, **aliasing** can be an
issue. Two pointers are said to alias when they point at the same location
in memory. Like this:

```{notrust,ignore}
```{ignore}
func mutate(&int i, int j) {
*i = j;
}
Expand Down Expand Up @@ -398,7 +398,7 @@ fn main() {

It gives this error:

```{notrust,ignore}
```{notrust}
test.rs:5:8: 5:10 error: cannot assign to `*x` because it is borrowed
test.rs:5 *x -= 1;
^~
Expand Down Expand Up @@ -522,7 +522,7 @@ boxes, though. As a rough approximation, you can treat this Rust code:

As being similar to this C code:

```{notrust,ignore}
```{ignore}
{
int *x;
x = (int *)malloc(sizeof(int));
Expand Down Expand Up @@ -626,7 +626,7 @@ fn main() {

This prints:

```{notrust,ignore}
```{ignore}
Cons(1, box Cons(2, box Cons(3, box Nil)))
```

Expand Down
6 changes: 3 additions & 3 deletions src/doc/guide-strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ for l in s.graphemes(true) {

This prints:

```{notrust,ignore}
```{text}
n͈̰̎
i̙̮͚̦
Expand All @@ -207,7 +207,7 @@ for l in s.chars() {

This prints:

```{notrust,ignore}
```{text}
u
͔
n
Expand Down Expand Up @@ -252,7 +252,7 @@ for l in s.bytes() {

This will print:

```{notrust,ignore}
```{text}
117
205
148
Expand Down
Loading