]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoDon't add unnamed address attributes to intrinsics.
Richard Diamond [Mon, 7 Sep 2015 00:26:41 +0000 (19:26 -0500)]
Don't add unnamed address attributes to intrinsics.

Intrinsics never have an address, so it doesn't make sense to say that their
address is unnamed.

8 years agoAuto merge of #28269 - petrochenkov:docorder, r=steveklabnik
bors [Sun, 6 Sep 2015 19:43:06 +0000 (19:43 +0000)]
Auto merge of #28269 - petrochenkov:docorder, r=steveklabnik

This is what I was talking about in https://github.com/rust-lang/rust/pull/26462#issuecomment-113883744

r? @steveklabnik

8 years agoAuto merge of #28265 - boblehest:master, r=bluss
bors [Sun, 6 Sep 2015 17:55:04 +0000 (17:55 +0000)]
Auto merge of #28265 - boblehest:master, r=bluss

In the last code snippet on the following page there is a bug in the
implementation of Vec::drain().

https://doc.rust-lang.org/nightly/nomicon/vec-drain.html

```rust
pub fn drain(&mut self) -> Drain<T> {
    // Oops, setting it to 0 while we still need the old value!
    self.len = 0;

    unsafe {
        Drain {
            // len is used to create a &[T] from &self here,
            // so we end up always creating an empty slice.
            iter: RawValIter::new(&self),
            vec: PhantomData,
        }
    }
}
```

A simple test to verify that Drain is broken can be found here:
https://play.rust-lang.org/?gist=30f579565e4bbf4836ce&version=nightly

And here's one with a fixed implementation:
https://play.rust-lang.org/?gist=2ec0c1a6dcf5defd7a53&version=nightly

8 years agoRustonomicon: Reword potentially confusing comment in Vec::drain.
Jørn Lode [Sun, 6 Sep 2015 16:21:57 +0000 (18:21 +0200)]
Rustonomicon: Reword potentially confusing comment in Vec::drain.

8 years agoFurther tweaks to doc/index.md
Vadim Petrochenkov [Sun, 6 Sep 2015 13:07:55 +0000 (16:07 +0300)]
Further tweaks to doc/index.md

8 years agoReorder sections in doc/index.md
Vadim Petrochenkov [Sun, 6 Sep 2015 12:25:01 +0000 (15:25 +0300)]
Reorder sections in doc/index.md

8 years agoRustonomicon: Fix bug in implementation of Vec::drain()
Jørn Lode [Sun, 6 Sep 2015 01:20:53 +0000 (03:20 +0200)]
Rustonomicon: Fix bug in implementation of Vec::drain()

In the last code snippet on the following page there is a bug in the
implementation of Vec::drain().

https://doc.rust-lang.org/nightly/nomicon/vec-drain.html

```rust
pub fn drain(&mut self) -> Drain<T> {
    // Oops, setting it to 0 while we still need the old value!
    self.len = 0;

    unsafe {
        Drain {
            // len is used to create a &[T] from &self here,
            // so we end up always creating an empty slice.
            iter: RawValIter::new(&self),
            vec: PhantomData,
        }
    }
}
```

A simple test to verify that Drain is broken can be found here:
https://play.rust-lang.org/?gist=30f579565e4bbf4836ce&version=nightly

And here's one with a fixed implementation:
https://play.rust-lang.org/?gist=2ec0c1a6dcf5defd7a53&version=nightly

8 years agoAuto merge of #28259 - christopherdumas:fix_empty_link, r=Manishearth
bors [Sun, 6 Sep 2015 01:01:38 +0000 (01:01 +0000)]
Auto merge of #28259 - christopherdumas:fix_empty_link, r=Manishearth

8 years agoAuto merge of #28190 - arielb1:generic-key-entry, r=eddyb
bors [Sat, 5 Sep 2015 22:15:40 +0000 (22:15 +0000)]
Auto merge of #28190 - arielb1:generic-key-entry, r=eddyb

Fixes #28181
This may fix #28151

r? @pnkfelix

8 years agoAdded link for hygenic macro system in macros.md
christopherdumas [Sat, 5 Sep 2015 13:04:15 +0000 (06:04 -0700)]
Added link for hygenic macro system in macros.md

8 years agoAuto merge of #28249 - stepancheg:get-num-cpus, r=huonw
bors [Sat, 5 Sep 2015 12:47:47 +0000 (12:47 +0000)]
Auto merge of #28249 - stepancheg:get-num-cpus, r=huonw

No need to export this symbol. `rust_get_num_cpus` is exported.

8 years agoAuto merge of #28258 - Manishearth:rollup, r=Manishearth
bors [Sat, 5 Sep 2015 11:01:42 +0000 (11:01 +0000)]
Auto merge of #28258 - Manishearth:rollup, r=Manishearth

- Successful merges: #28225, #28231, #28234, #28253
- Failed merges:

8 years agoRollup merge of #28253 - murarth:prelude-typo, r=steveklabnik
Manish Goregaokar [Sat, 5 Sep 2015 10:46:02 +0000 (16:16 +0530)]
Rollup merge of #28253 - murarth:prelude-typo, r=steveklabnik

8 years agoRollup merge of #28234 - AlisdairO:diagnostics247, r=Manishearth
Manish Goregaokar [Sat, 5 Sep 2015 10:46:01 +0000 (16:16 +0530)]
Rollup merge of #28234 - AlisdairO:diagnostics247, r=Manishearth

As title :-)
Part of #24407.

r? @Manishearth

8 years agoRollup merge of #28231 - GuillaumeGomez:help_note, r=Manishearth
Manish Goregaokar [Sat, 5 Sep 2015 10:46:01 +0000 (16:16 +0530)]
Rollup merge of #28231 - GuillaumeGomez:help_note, r=Manishearth

r? @Manishearth

8 years agoRollup merge of #28225 - jackwilsonv:patch-3, r=steveklabnik
Manish Goregaokar [Sat, 5 Sep 2015 10:46:01 +0000 (16:16 +0530)]
Rollup merge of #28225 - jackwilsonv:patch-3, r=steveklabnik

r? @steveklabnik

8 years agoAdd erroneous code example for E0010
Guillaume Gomez [Fri, 4 Sep 2015 16:11:51 +0000 (18:11 +0200)]
Add erroneous code example for E0010

8 years agoAuto merge of #28242 - Diggsey:msvc-backtrace, r=alexcrichton
bors [Sat, 5 Sep 2015 07:21:01 +0000 (07:21 +0000)]
Auto merge of #28242 - Diggsey:msvc-backtrace, r=alexcrichton

Currently LLVM does not generate the debug info required to get complete backtraces even when functions are inlined, so that part of the `run-pass/backtrace-debuginfo.rs` test is disabled when targetting MSVC. At worst this results in missing stack frames where functions have been inlined.

8 years agoFix typo in prelude docs
Murarth [Sat, 5 Sep 2015 04:27:55 +0000 (21:27 -0700)]
Fix typo in prelude docs

8 years agoAuto merge of #28240 - nhowell:master, r=steveklabnik
bors [Sat, 5 Sep 2015 04:03:34 +0000 (04:03 +0000)]
Auto merge of #28240 - nhowell:master, r=steveklabnik

The Introduction page generated by rustbook used weird relative links
like "./getting-started.html" instead of just "getting-started.html"
like on the other pages. This adversely affected Windows builds the
worst, since it generated links like ".\getting-started.html" (note the
backslash). If you then try to upload the generated book to a webserver,
you end up with 404's. See this example of what is going on with the
Introduction page links and why this PR should fix it:
http://is.gd/fRUTXk

Compare the links on these two pages, for instance:
https://doc.rust-lang.org/nightly/book/
https://doc.rust-lang.org/nightly/book/getting-started.html

Also, fix a few whitespace issues in build.rs.

8 years agoAuto merge of #28221 - huonw:simd, r=alexcrichton
bors [Sat, 5 Sep 2015 02:15:41 +0000 (02:15 +0000)]
Auto merge of #28221 - huonw:simd, r=alexcrichton

The ARM equivalents of the AArch64 are annoyingly more complicated (and some of the AArch64 ones are too).

I think I've got exposed all the x86 intrinsics from SSE to AVX2 now (at least, the ones that LLVM implements as callable intrinsics).

8 years agoget_num_cpus function should be static
Stepan Koltsov [Sat, 5 Sep 2015 02:03:48 +0000 (05:03 +0300)]
get_num_cpus function should be static

No need to export this symbol. `rust_get_num_cpus` is exported.

8 years agoAdd line numbers to MSVC backtrace
Diggory Blake [Fri, 4 Sep 2015 22:17:16 +0000 (23:17 +0100)]
Add line numbers to MSVC backtrace
Add comments

8 years agoAuto merge of #28161 - nrc:fmt, r=brson
bors [Fri, 4 Sep 2015 23:32:35 +0000 (23:32 +0000)]
Auto merge of #28161 - nrc:fmt, r=brson

8 years agofixup
Nick Cameron [Wed, 2 Sep 2015 03:42:38 +0000 (15:42 +1200)]
fixup

8 years agorustfmt librustc_trans/save
Nick Cameron [Wed, 2 Sep 2015 03:37:07 +0000 (15:37 +1200)]
rustfmt librustc_trans/save

8 years agorustbook: Fix relative links on the Introduction page
Nick Howell [Fri, 4 Sep 2015 21:00:33 +0000 (17:00 -0400)]
rustbook: Fix relative links on the Introduction page

The Introduction page generated by rustbook used weird relative links
like "./getting-started.html" instead of just "getting-started.html"
like on the other pages. This adversely affected Windows builds the
worst, since it generated links like ".\getting-started.html" (note the
backslash). If you then try to upload the generated book to a webserver,
you end up with 404's. See this example of what is going on with the
Introduction page links and why this PR should fix it:
http://is.gd/fRUTXk

Compare the links on these two pages, for instance:
https://doc.rust-lang.org/nightly/book/
https://doc.rust-lang.org/nightly/book/getting-started.html

Also, fix a few whitespace issues in build.rs.

8 years agoAuto merge of #28197 - petrochenkov:borrow, r=alexcrichton
bors [Fri, 4 Sep 2015 20:23:51 +0000 (20:23 +0000)]
Auto merge of #28197 - petrochenkov:borrow, r=alexcrichton

8 years agoAdd long diagnostics for E0247
Alisdair Owens [Fri, 4 Sep 2015 18:21:22 +0000 (19:21 +0100)]
Add long diagnostics for E0247

8 years agoAuto merge of #28035 - Diggsey:msvc-escaping, r=alexcrichton
bors [Fri, 4 Sep 2015 17:58:35 +0000 (17:58 +0000)]
Auto merge of #28035 - Diggsey:msvc-escaping, r=alexcrichton

This fixes #28018 with the exception of the point about cmake, but that's really a limitation of `./configure` builds.

8 years agoAuto merge of #28227 - birkenfeld:use_filter_map, r=alexcrichton
bors [Fri, 4 Sep 2015 16:16:09 +0000 (16:16 +0000)]
Auto merge of #28227 - birkenfeld:use_filter_map, r=alexcrichton

8 years agoAdd some fancier AArch64 load/store instructions.
Huon Wilson [Fri, 4 Sep 2015 00:06:34 +0000 (17:06 -0700)]
Add some fancier AArch64 load/store instructions.

8 years agoSupport return aggregates in platform intrinsics.
Huon Wilson [Fri, 4 Sep 2015 00:00:11 +0000 (17:00 -0700)]
Support return aggregates in platform intrinsics.

This also involved adding `[TYPE;N]` syntax and aggregate indexing
support to the generator script: it's the only way to be able to have a
parameterised intrinsic that returns an aggregate, since one can't refer
to previous elements of the current aggregate (and that was harder to
implement).

8 years agoAdd various pointer & void-using x86 intrinsics.
Huon Wilson [Thu, 3 Sep 2015 21:50:20 +0000 (14:50 -0700)]
Add various pointer & void-using x86 intrinsics.

8 years agoSupport bitcasts in platform intrinsic generator.
Huon Wilson [Thu, 3 Sep 2015 18:25:52 +0000 (11:25 -0700)]
Support bitcasts in platform intrinsic generator.

8 years agoSupport void in platform intrinsic generator.
Huon Wilson [Wed, 2 Sep 2015 23:55:28 +0000 (16:55 -0700)]
Support void in platform intrinsic generator.

8 years agoSupport non-return value references in platform intrinsic generator.
Huon Wilson [Wed, 2 Sep 2015 23:46:41 +0000 (16:46 -0700)]
Support non-return value references in platform intrinsic generator.

8 years agoAdd support for pointers to generator.py.
Huon Wilson [Wed, 2 Sep 2015 20:59:35 +0000 (13:59 -0700)]
Add support for pointers to generator.py.

8 years agoAdd span_help for E0002
Guillaume Gomez [Fri, 4 Sep 2015 16:09:16 +0000 (18:09 +0200)]
Add span_help for E0002

8 years agoAuto merge of #28201 - apasel422:issue-26205, r=nikomatsakis
bors [Fri, 4 Sep 2015 14:16:54 +0000 (14:16 +0000)]
Auto merge of #28201 - apasel422:issue-26205, r=nikomatsakis

Closes #26205.

r? @eddyb

8 years agoAuto merge of #28119 - nagisa:bytesderef, r=alexcrichton
bors [Fri, 4 Sep 2015 12:34:03 +0000 (12:34 +0000)]
Auto merge of #28119 - nagisa:bytesderef, r=alexcrichton

8 years agoAuto merge of #28069 - alexcrichton:rt-atexit, r=brson
bors [Fri, 4 Sep 2015 10:33:42 +0000 (10:33 +0000)]
Auto merge of #28069 - alexcrichton:rt-atexit, r=brson

This adds a call to `rt::cleanup` on `process::exit` to make sure we clean up
after ourselves on the way out from Rust.

Closes #28065

8 years agoFix escaping in msvc builds
Diggory Blake [Thu, 27 Aug 2015 17:16:31 +0000 (18:16 +0100)]
Fix escaping in msvc builds

8 years agoAuto merge of #28034 - alexcrichton:new-lines, r=aturon
bors [Fri, 4 Sep 2015 08:50:56 +0000 (08:50 +0000)]
Auto merge of #28034 - alexcrichton:new-lines, r=aturon

This commit is an implementation of [RFC 1212][rfc] which tweaks the behavior of
the `str::lines` and `BufRead::lines` iterators. Both iterators now account for
`\r\n` sequences in addition to `\n`, allowing for less surprising behavior
across platforms (especially in the `BufRead` case). Splitting *only* on the
`\n` character can still be achieved with `split('\n')` in both cases.

The `str::lines_any` function is also now deprecated as `str::lines` is a
drop-in replacement for it.

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1212-line-endings.md

Closes #28032

8 years agoAuto merge of #28004 - Diggsey:win-backtrace, r=alexcrichton
bors [Fri, 4 Sep 2015 07:08:17 +0000 (07:08 +0000)]
Auto merge of #28004 - Diggsey:win-backtrace, r=alexcrichton

Technically this could also be used for `windows-msvc` targets, as I believe they have *both* dwarf and pdb debug information, but I haven't enabled it there as it should really use the native windows APIs for that, instead of libbacktrace.

I wasn't exactly sure where I should put "gnu" specific stuff, so tell me if I should structure things differently.

This is still a WIP, and I haven't tested properly to make sure I haven't broken msvc/linux builds yet.

8 years agostd: Account for CRLF in {str, BufRead}::lines
Alex Crichton [Thu, 27 Aug 2015 00:30:45 +0000 (17:30 -0700)]
std: Account for CRLF in {str, BufRead}::lines

This commit is an implementation of [RFC 1212][rfc] which tweaks the behavior of
the `str::lines` and `BufRead::lines` iterators. Both iterators now account for
`\r\n` sequences in addition to `\n`, allowing for less surprising behavior
across platforms (especially in the `BufRead` case). Splitting *only* on the
`\n` character can still be achieved with `split('\n')` in both cases.

The `str::lines_any` function is also now deprecated as `str::lines` is a
drop-in replacement for it.

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1212-line-endings.md

Closes #28032

8 years agoAuto merge of #28170 - nagisa:loopctl-label-spans, r=alexcrichton
bors [Fri, 4 Sep 2015 05:15:22 +0000 (05:15 +0000)]
Auto merge of #28170 - nagisa:loopctl-label-spans, r=alexcrichton

r? @alexcrichton

8 years agoCapitalize circle reference
Jack Wilson [Fri, 4 Sep 2015 03:51:08 +0000 (20:51 -0700)]
Capitalize circle reference

8 years agoFixes minor formatting inconsistencies
Jack Wilson [Fri, 4 Sep 2015 03:48:26 +0000 (20:48 -0700)]
Fixes minor formatting inconsistencies

8 years agoAuto merge of #28220 - steveklabnik:rollup, r=steveklabnik
bors [Fri, 4 Sep 2015 02:33:44 +0000 (02:33 +0000)]
Auto merge of #28220 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #28167, #28202, #28203, #28204, #28205, #28207, #28208, #28209, #28210, #28212, #28213, #28214, #28215, #28216
- Failed merges:

8 years agoAdd line numbers to windows-gnu backtraces
Diggory Blake [Wed, 26 Aug 2015 00:44:55 +0000 (01:44 +0100)]
Add line numbers to windows-gnu backtraces
Fix formatting
Remove unused imports
Refactor
Fix msvc build
Fix line lengths
Formatting
Enable backtrace tests
Fix using directive on mac
pwd info
Work-around buildbot PWD bug, and fix libbacktrace configuration
Use alternative to `env -u` which is not supported on bitrig
Disable tests on 32-bit windows gnu

8 years agoReapply rust-specific changes to libbacktrace
Tim Cuthbertson [Sat, 11 Apr 2015 12:21:47 +0000 (22:21 +1000)]
Reapply rust-specific changes to libbacktrace

This includes the changes from commits:

 - cd8f31759fd04b9ce9c903fa00cae81dc5bba546
 - fcb30a0b67b1bd4acbc3422ff74fac5d031ae1ae

8 years agoUpdate libbacktrace to r227145
Diggory Blake [Tue, 25 Aug 2015 19:01:26 +0000 (20:01 +0100)]
Update libbacktrace to r227145

8 years agoRollup merge of #28216 - christopherdumas:fix_28196, r=steveklabnik
Steve Klabnik [Fri, 4 Sep 2015 00:10:10 +0000 (20:10 -0400)]
Rollup merge of #28216 - christopherdumas:fix_28196, r=steveklabnik

This is a docs change suggested in #28196.
r? @steveklabnik

8 years agoRollup merge of #28215 - matklad:grammar-extern-block-item, r=steveklabnik
Steve Klabnik [Fri, 4 Sep 2015 00:10:09 +0000 (20:10 -0400)]
Rollup merge of #28215 - matklad:grammar-extern-block-item, r=steveklabnik

extern_block should be extern_block_item.

extern_block_item is `extern { bunch of fns }`, extern_block is just `bunch of fns`

r? @steveklabnik

8 years agoRollup merge of #28214 - tshepang:word-not-name, r=steveklabnik
Steve Klabnik [Fri, 4 Sep 2015 00:10:09 +0000 (20:10 -0400)]
Rollup merge of #28214 - tshepang:word-not-name, r=steveklabnik

Also, add missing comma

8 years agoRollup merge of #28213 - tshepang:replace-comma, r=steveklabnik
Steve Klabnik [Fri, 4 Sep 2015 00:10:09 +0000 (20:10 -0400)]
Rollup merge of #28213 - tshepang:replace-comma, r=steveklabnik

8 years agoRollup merge of #28212 - tshepang:rust-is-a-language, r=steveklabnik
Steve Klabnik [Fri, 4 Sep 2015 00:10:09 +0000 (20:10 -0400)]
Rollup merge of #28212 - tshepang:rust-is-a-language, r=steveklabnik

8 years agoRollup merge of #28210 - tshepang:typo, r=steveklabnik
Steve Klabnik [Fri, 4 Sep 2015 00:10:08 +0000 (20:10 -0400)]
Rollup merge of #28210 - tshepang:typo, r=steveklabnik

8 years agoRollup merge of #28209 - tshepang:must-be-four-spaces, r=steveklabnik
Steve Klabnik [Fri, 4 Sep 2015 00:10:08 +0000 (20:10 -0400)]
Rollup merge of #28209 - tshepang:must-be-four-spaces, r=steveklabnik

Also, add trailing commas

8 years agoRollup merge of #28208 - matklad:grammar-whitespace-cleanup, r=steveklabnik
Steve Klabnik [Fri, 4 Sep 2015 00:10:08 +0000 (20:10 -0400)]
Rollup merge of #28208 - matklad:grammar-whitespace-cleanup, r=steveklabnik

8 years agoRollup merge of #28207 - tshepang:flow, r=steveklabnik
Steve Klabnik [Fri, 4 Sep 2015 00:10:08 +0000 (20:10 -0400)]
Rollup merge of #28207 - tshepang:flow, r=steveklabnik

8 years agoRollup merge of #28205 - matklad:grammar-remove-proc, r=alexcrichton
Steve Klabnik [Fri, 4 Sep 2015 00:10:07 +0000 (20:10 -0400)]
Rollup merge of #28205 - matklad:grammar-remove-proc, r=alexcrichton

As I understand, there are no proc closures in Rust any more. So this pr removes `procedure_type` production. It isn't used anywhere. The `proc` is still a keyword.

r? @steveklabnik
@bors: r+ rollup

8 years agoRollup merge of #28204 - matklad:grammar-duplicate-else-tail, r=steveklabnik
Steve Klabnik [Fri, 4 Sep 2015 00:10:07 +0000 (20:10 -0400)]
Rollup merge of #28204 - matklad:grammar-duplicate-else-tail, r=steveklabnik

The rule `else_tail` was duplicated in `if` and `if_let` sections. I guess that this is a mistake.

r? @steveklabnik

8 years agoRollup merge of #28203 - benschulz:book-deref-coercion, r=brson
Steve Klabnik [Fri, 4 Sep 2015 00:10:07 +0000 (20:10 -0400)]
Rollup merge of #28203 - benschulz:book-deref-coercion, r=brson

I have two issues with the section "Deref and method calls" of the book's chapter "Deref coercions".

 - (Minor) It says "In other words, these are the same two things in Rust:", followed by a code block in which no two things seem similar, much less the same. Presumably this sentence made more sense in a previous revision.

 - The next paragraph conflates two concepts which, imho, should kept separate. They are
    - deref coercion, i.e. inserting as many `*` as necessary and
    - implicitly referencing the receiver, i.e. inserting a single `&` to satisfy the method's `self` parameter type.

I appreciate that with the proposed changes the example becomes very contrived, even for a foo-bar-baz one. However, the current exmplanation is just wrong.

8 years agoRollup merge of #28202 - matklad:grammar-loop-labels, r=steveklabnik
Steve Klabnik [Fri, 4 Sep 2015 00:10:07 +0000 (20:10 -0400)]
Rollup merge of #28202 - matklad:grammar-loop-labels, r=steveklabnik

This adds missing `?` marks to productions for loops and break/continue.

It also adds missing option label to while let loop.

Note that '[' foo ']' means grouping in BNF, and '?' is used for possible missing items.

r? @steveklabnik

8 years agoRollup merge of #28167 - petrochenkov:bytelit, r=nikomatsakis
Steve Klabnik [Fri, 4 Sep 2015 00:10:07 +0000 (20:10 -0400)]
Rollup merge of #28167 - petrochenkov:bytelit, r=nikomatsakis

Avoid confusion with binary integer literals and binary operator expressions in libsyntax

8 years agoAuto merge of #27984 - arielb1:misc-assemble-improvements, r=nikomatsakis
bors [Fri, 4 Sep 2015 00:00:09 +0000 (00:00 +0000)]
Auto merge of #27984 - arielb1:misc-assemble-improvements, r=nikomatsakis

this resolves type-variables early in assemble_candidates and
bails out quickly if the self type is an inference variable (which would
fail anyway because of `assemble_candidates_from_projected_tys`).

In both these cases, `assemble_candidates_from_impls` would try to go
over all impls and match them, leading to O(`n*m`) performance. Fixing this
improves rustc type-checking performance by 10%. As type-checking is only
is 5% of compilation, this doesn't impact bootstrap times, but *does*
improve type-error-detection time which is nice.

Crates that have many dependencies and contain significant amounts of
generic functions could see a bigger perf boost. As a microbenchmark,
the crate generated by

```
echo '#![feature(rustc_private)]'
echo 'extern crate rustc_driver;'
for i in {1..1000}; do cat << _EOF_
    pub fn foo$i<T>() {
        let mut v = Vec::new();
        let _w = v.clone();
        v.push("");
    }
_EOF_
done
```

sees performance improve from 7.2 to 1.4 seconds. I imagine many crates
would fall somewhere in-between.

r? @nikomatsakis

8 years agoRemoved incorrect reference from #28196
christopherdumas [Thu, 3 Sep 2015 21:39:34 +0000 (14:39 -0700)]
Removed incorrect reference from #28196

8 years agoreference grammar: fix item definition
Aleksey Kladov [Thu, 3 Sep 2015 21:29:47 +0000 (00:29 +0300)]
reference grammar: fix item definition

extern_block should extern_block_item

8 years agoreference grammar: whitespace cleanup
Aleksey Kladov [Thu, 3 Sep 2015 20:42:33 +0000 (23:42 +0300)]
reference grammar: whitespace cleanup

8 years agobook: it is RwLock, not RWLock
Tshepang Lekhonkhobe [Thu, 3 Sep 2015 20:14:28 +0000 (22:14 +0200)]
book: it is RwLock, not RWLock

8 years agoAuto merge of #28200 - Manishearth:rollup, r=Manishearth
bors [Thu, 3 Sep 2015 20:10:42 +0000 (20:10 +0000)]
Auto merge of #28200 - Manishearth:rollup, r=Manishearth

- Successful merges: #28164, #28170, #28184, #28186, #28187, #28188, #28191, #28193, #28194, #28195
- Failed merges:

8 years agoAdd ptr import (fixup #28187)
Manish Goregaokar [Thu, 3 Sep 2015 18:33:38 +0000 (00:03 +0530)]
Add ptr import (fixup #28187)

8 years agoRollup merge of #28195 - AlisdairO:diagnostics214, r=Manishearth
Manish Goregaokar [Thu, 3 Sep 2015 18:00:38 +0000 (23:30 +0530)]
Rollup merge of #28195 - AlisdairO:diagnostics214, r=Manishearth

As title :-)
Part of #24407.

r? @Manishearth

8 years agoRollup merge of #28194 - steveklabnik:add_fixme, r=alexcrichton
Manish Goregaokar [Thu, 3 Sep 2015 18:00:38 +0000 (23:30 +0530)]
Rollup merge of #28194 - steveklabnik:add_fixme, r=alexcrichton

8 years agoRollup merge of #28193 - dhuseby:fixing_bitrig_alloc_crate_tests, r=alexcrichton
Manish Goregaokar [Thu, 3 Sep 2015 18:00:38 +0000 (23:30 +0530)]
Rollup merge of #28193 - dhuseby:fixing_bitrig_alloc_crate_tests, r=alexcrichton

@alexcrichton this will get the bitrig buildbot back to green.

8 years agoRollup merge of #28191 - llogiq:iter, r=Manishearth
Manish Goregaokar [Thu, 3 Sep 2015 18:00:38 +0000 (23:30 +0530)]
Rollup merge of #28191 - llogiq:iter, r=Manishearth

Nothing too big, a few needless returns and a few closures eliminated (the latter may improve performance in some cases, at least compilation should be a bit faster).

8 years agoRollup merge of #28188 - Manishearth:elide-core, r=alexcrichton
Manish Goregaokar [Thu, 3 Sep 2015 18:00:37 +0000 (23:30 +0530)]
Rollup merge of #28188 - Manishearth:elide-core, r=alexcrichton

Makes things more greppable.

This change was made automatically by clippy + bash scripts, though I will run test passes, please review carefully.

8 years agoRollup merge of #28187 - petrochenkov:null, r=aturon
Manish Goregaokar [Thu, 3 Sep 2015 18:00:37 +0000 (23:30 +0530)]
Rollup merge of #28187 - petrochenkov:null, r=aturon

And replace more `0 as *const T`/`0 as *mut T`s with `null()`/`null_mut()`s

I'm not sure what is the general policy about making simple functions `const`, but `null()` and `null_mut()` seem to be good candidates.

8 years agoRollup merge of #28186 - thomas07vt:thomas07vt-patch-trpl-rust-inside-other-languages...
Manish Goregaokar [Thu, 3 Sep 2015 18:00:37 +0000 (23:30 +0530)]
Rollup merge of #28186 - thomas07vt:thomas07vt-patch-trpl-rust-inside-other-languages.md, r=steveklabnik

The embed rust file that we compile prints out 'Thread finished..' messages along with a 'done!' r? @steveklabnik

8 years agoRollup merge of #28184 - xiaochuanyu:patch-1, r=alexcrichton
Manish Goregaokar [Thu, 3 Sep 2015 18:00:37 +0000 (23:30 +0530)]
Rollup merge of #28184 - xiaochuanyu:patch-1, r=alexcrichton

Originally in an example it reads as follows:
```rust
fn inverse<T>() -> T
        // this is using ConvertTo as if it were "ConvertFrom<i32>"
         where i32: ConvertTo<T> {
     42.convert()
 }
```
There was no mention of `ConvertFrom` elsewhere in the page other than in this comment. Is this supposed to be `ConvertTo<i64>` ?
I'm confused by this example.

8 years agodoc: reduce indentation of examples to 4 spaces
Tshepang Lekhonkhobe [Thu, 3 Sep 2015 20:06:23 +0000 (22:06 +0200)]
doc: reduce indentation of examples to 4 spaces

Also, add trailing commas

8 years agobook: improve flow
Tshepang Lekhonkhobe [Thu, 3 Sep 2015 19:54:00 +0000 (21:54 +0200)]
book: improve flow

8 years agobook: Rust is a language, so no need to mention that fact here
Tshepang Lekhonkhobe [Thu, 3 Sep 2015 19:40:19 +0000 (21:40 +0200)]
book: Rust is a language, so no need to mention that fact here

8 years agoreference grammar: remove procedure_type
Aleksey Kladov [Thu, 3 Sep 2015 19:25:47 +0000 (22:25 +0300)]
reference grammar: remove procedure_type

8 years agoreference grammar: remove duplicate else_tail rule
Aleksey Kladov [Thu, 3 Sep 2015 19:19:56 +0000 (22:19 +0300)]
reference grammar: remove duplicate else_tail rule

8 years agoTake method invocation semantics out of chapter on deref coercion.
benshu [Thu, 3 Sep 2015 19:17:59 +0000 (21:17 +0200)]
Take method invocation semantics out of chapter on deref coercion.

8 years agobook: "word" feels more suitable than "name"
Tshepang Lekhonkhobe [Thu, 3 Sep 2015 19:14:01 +0000 (21:14 +0200)]
book: "word" feels more suitable than "name"

Also, add missing comma

8 years agoreference grammar: loop label should be optional
Aleksey Kladov [Thu, 3 Sep 2015 19:13:50 +0000 (22:13 +0300)]
reference grammar: loop label should be optional

This adds missing `?` marks to productions for loops and break/continue.

It also adds missing option label to while let loop

8 years agobook: replace comma with a more suitable character
Tshepang Lekhonkhobe [Thu, 3 Sep 2015 19:05:35 +0000 (21:05 +0200)]
book: replace comma with a more suitable character

8 years agoFix multiple mutable autoderefs with `Box`
Andrew Paseltiner [Thu, 3 Sep 2015 17:10:34 +0000 (13:10 -0400)]
Fix multiple mutable autoderefs with `Box`

Closes #26205.

8 years agoRollup merge of #28164 - AlisdairO:diagnostics329, r=Manishearth
Manish Goregaokar [Thu, 3 Sep 2015 18:00:36 +0000 (23:30 +0530)]
Rollup merge of #28164 - AlisdairO:diagnostics329, r=Manishearth

As title :-)
Part of #24407.

r? @Manishearth

8 years agoImplement `Borrow` for fixed-size arrays
Vadim Petrochenkov [Thu, 3 Sep 2015 16:35:26 +0000 (19:35 +0300)]
Implement `Borrow` for fixed-size arrays

8 years agoadd long diagnostics for E0214
Alisdair Owens [Thu, 3 Sep 2015 16:01:50 +0000 (17:01 +0100)]
add long diagnostics for E0214

8 years agomiddle: use filter_map instead of flat_map with Option iters
Georg Brandl [Sun, 30 Aug 2015 15:14:23 +0000 (17:14 +0200)]
middle: use filter_map instead of flat_map with Option iters

8 years agoAuto merge of #28192 - Manishearth:lint-hir, r=eddyb
bors [Thu, 3 Sep 2015 15:42:16 +0000 (15:42 +0000)]
Auto merge of #28192 - Manishearth:lint-hir, r=eddyb

LintPass still uses the AST, though there isn't any need to. This makes it hard to move lints to the HIR.

r? @eddyb @nrc

8 years agoMove lints to HIR
Manish Goregaokar [Thu, 3 Sep 2015 13:29:56 +0000 (18:59 +0530)]
Move lints to HIR

8 years agoAdd an issue number to this FIXME
Steve Klabnik [Thu, 3 Sep 2015 15:00:33 +0000 (11:00 -0400)]
Add an issue number to this FIXME

8 years agoFixes #27886 -- bitrig does not use jemalloc (yet)
Dave Huseby [Thu, 3 Sep 2015 14:25:21 +0000 (07:25 -0700)]
Fixes #27886 -- bitrig does not use jemalloc (yet)