]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoFix the manual implementation example for the Debug trait so it matches the given...
Erik Davidson [Thu, 12 Nov 2015 21:03:36 +0000 (15:03 -0600)]
Fix the manual implementation example for the Debug trait so it matches the given output

8 years agoAuto merge of #29757 - dotdash:mir_simplify_cfg, r=nikomatsakis
bors [Thu, 12 Nov 2015 15:48:34 +0000 (15:48 +0000)]
Auto merge of #29757 - dotdash:mir_simplify_cfg, r=nikomatsakis

For now, this pass does some easy transformations, like eliminating
empty blocks that just jump to another block, some trivial
conversion of If terminators into Gotos and removal of dead blocks.

r? @nikomatsakis

8 years agoAdd a MIR pass to simplify the control flow graph
Björn Steinbrink [Tue, 10 Nov 2015 20:38:36 +0000 (21:38 +0100)]
Add a MIR pass to simplify the control flow graph

For now, this pass does some easy transformations, like eliminating
empty blocks that just jump to another block, some trivial
conversion of If terminators into Gotos and removal of dead blocks.

8 years agoAuto merge of #29544 - Ryman:reduce_doc_warnings, r=steveklabnik
bors [Thu, 12 Nov 2015 13:07:45 +0000 (13:07 +0000)]
Auto merge of #29544 - Ryman:reduce_doc_warnings, r=steveklabnik

Did this alphabetically, so I didn't see [how `std` was doing things](https://dxr.mozilla.org/rust/source/src/libstd/lib.rs#215) till I was nearly finished. If you prefer to add crate-level-whitelists like std instead of test-level, I can rebase with that strategy.

A number of these commits can probably be dropped as the crates don't have much to test, and are deprecated. Let me know which if any to drop! (can also squash after review if desired)

r? @steveklabnik

8 years agoAuto merge of #29770 - ollie27:assert_eq_unsized, r=alexcrichton
bors [Thu, 12 Nov 2015 10:38:48 +0000 (10:38 +0000)]
Auto merge of #29770 - ollie27:assert_eq_unsized, r=alexcrichton

`format_args!` doesn't support none Sized types so we should just pass it the references to `left_val` and `right_val`.

The following works:
```rust
assert!([1, 2, 3][..] == vec![1, 2, 3][..])
```
So I would expect this to as well:
```rust
assert_eq!([1, 2, 3][..], vec![1, 2, 3][..])
```
But it fails with "error: the trait `core::marker::Sized` is not implemented for the type `[_]` [E0277]"
I don't know if this change will have any nasty side effects I don't understand.

8 years agoAuto merge of #29795 - Manishearth:rollup, r=Manishearth
bors [Thu, 12 Nov 2015 08:02:43 +0000 (08:02 +0000)]
Auto merge of #29795 - Manishearth:rollup, r=Manishearth

- Successful merges: #29776, #29785, #29786, #29787
- Failed merges:

8 years agoFixup #29785
Manish Goregaokar [Thu, 12 Nov 2015 07:50:48 +0000 (13:20 +0530)]
Fixup #29785

8 years agoFixup #29776
Manish Goregaokar [Thu, 12 Nov 2015 07:50:16 +0000 (13:20 +0530)]
Fixup #29776

8 years agoRollup merge of #29787 - dbrgn:docs-fix, r=steveklabnik
Manish Goregaokar [Thu, 12 Nov 2015 07:48:51 +0000 (13:18 +0530)]
Rollup merge of #29787 - dbrgn:docs-fix, r=steveklabnik

Fix usage of wrong article in `Result` docs.

This is my first rust PR, if something about the process is wrong let me know.

As this is a documentation change, I believe the correct highfive line to use is the following:

r? @steveklabnik

8 years agoRollup merge of #29786 - steveklabnik:stage0fix, r=brson
Manish Goregaokar [Thu, 12 Nov 2015 07:48:51 +0000 (13:18 +0530)]
Rollup merge of #29786 - steveklabnik:stage0fix, r=brson

8 years agoRollup merge of #29785 - steveklabnik:doc_prelude, r=nikomatsakis
Manish Goregaokar [Thu, 12 Nov 2015 07:48:51 +0000 (13:18 +0530)]
Rollup merge of #29785 - steveklabnik:doc_prelude, r=nikomatsakis

This mostly brings them in line with existing linking convention, but
also has some minor re-wording.

The text at the top has been re-focused, by starting out with what the
prelude does, rather than starting from injecting std.

Also, it now mentions that other preludes exist.

Part of https://github.com/rust-lang/rust/issues/29369

8 years agoRollup merge of #29776 - nikomatsakis:mir-29740, r=nrc
Manish Goregaokar [Thu, 12 Nov 2015 07:48:51 +0000 (13:18 +0530)]
Rollup merge of #29776 - nikomatsakis:mir-29740, r=nrc

In previous PRs, I changed the match desugaring to generate more efficient code for ints/chars and the like. But this doesn't help when you're matching strings, ranges, or other crazy complex things (leading to #29740). This commit restructures match desugaring *yet again* to handle that case better -- basically we now degenerate to an if-else-if chain in such cases.

~~Note that this builds on https://github.com/rust-lang/rust/pull/29763 which will hopefully land soon. So ignore the first few commits.~~ landed now

r? @Aatch since he's been reviewing the other commits in this series

8 years agotrpl: add a small section outlining doctest configuration
Kevin Butler [Tue, 3 Nov 2015 16:42:25 +0000 (16:42 +0000)]
trpl: add a small section outlining doctest configuration

8 years agolibtest: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 16:37:29 +0000 (16:37 +0000)]
libtest: deny warnings in doctests

8 years agolibterm: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 16:35:33 +0000 (16:35 +0000)]
libterm: deny warnings in doctests

8 years agolibsyntax: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 16:34:11 +0000 (16:34 +0000)]
libsyntax: deny warnings in doctests

8 years agolibserialize: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 16:17:57 +0000 (16:17 +0000)]
libserialize: deny warnings in doctests

8 years agolibrustc_unicode: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 16:12:25 +0000 (16:12 +0000)]
librustc_unicode: deny warnings in doctests

8 years agolibrbml: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 16:06:02 +0000 (16:06 +0000)]
librbml: deny warnings in doctests

8 years agolibrand: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 16:04:40 +0000 (16:04 +0000)]
librand: deny warnings in doctests

8 years agoliblog: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 16:03:06 +0000 (16:03 +0000)]
liblog: deny warnings in doctests

8 years agolibgraphviz: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 15:33:58 +0000 (15:33 +0000)]
libgraphviz: deny warnings in doctests

8 years agolibgetopts: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 15:32:48 +0000 (15:32 +0000)]
libgetopts: deny warnings in doctests

8 years agolibfmt_macros: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 15:30:14 +0000 (15:30 +0000)]
libfmt_macros: deny warnings in doctests

8 years agolibflate: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 15:28:58 +0000 (15:28 +0000)]
libflate: deny warnings in doctests

8 years agolibcore: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 15:27:03 +0000 (15:27 +0000)]
libcore: deny warnings in doctests

8 years agolibcollections: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 14:49:33 +0000 (14:49 +0000)]
libcollections: deny warnings in doctests

8 years agolibarena: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 14:03:22 +0000 (14:03 +0000)]
libarena: deny warnings in doctests

8 years agoliballoc: deny warnings in doctests
Kevin Butler [Tue, 3 Nov 2015 14:02:48 +0000 (14:02 +0000)]
liballoc: deny warnings in doctests

8 years agoAuto merge of #29764 - nrc:stats, r=nikomatsakis
bors [Thu, 12 Nov 2015 04:06:48 +0000 (04:06 +0000)]
Auto merge of #29764 - nrc:stats, r=nikomatsakis

Emits loc, and node count - before and after expansion.

E.g.,

```
rustc: x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore
Lines of code:             32060
Pre-expansion node count:  120205
Post-expansion node count: 482749
```

r? @nikomatsakis

8 years agoAuto merge of #29616 - nagisa:mir-repeat, r=nikomatsakis
bors [Thu, 12 Nov 2015 02:24:06 +0000 (02:24 +0000)]
Auto merge of #29616 - nagisa:mir-repeat, r=nikomatsakis

r? @nikomatsakis

I went ahead and replaced repeat count with a `Constant`, because it cannot be non-constant to the best of my knowledge.

8 years agoignore pretty since it dies for some mysterious reason I can't be
Niko Matsakis [Wed, 11 Nov 2015 23:54:37 +0000 (18:54 -0500)]
ignore pretty since it dies for some mysterious reason I can't be
bothered to track down for a regresson test. /me hopes no one notices

8 years agoAuto merge of #29748 - petrochenkov:issue29746, r=nrc
bors [Wed, 11 Nov 2015 23:31:51 +0000 (23:31 +0000)]
Auto merge of #29748 - petrochenkov:issue29746, r=nrc

Closes https://github.com/rust-lang/rust/issues/29746

8 years agoConst-eval array element repetition count
Simonas Kazlauskas [Wed, 11 Nov 2015 15:58:41 +0000 (17:58 +0200)]
Const-eval array element repetition count

8 years agoFix article in Result.map and Result.map_err documentation
Danilo Bargen [Wed, 11 Nov 2015 23:01:55 +0000 (00:01 +0100)]
Fix article in Result.map and Result.map_err documentation

8 years agoFix hygiene regression in patterns
Vadim Petrochenkov [Tue, 10 Nov 2015 21:01:25 +0000 (00:01 +0300)]
Fix hygiene regression in patterns

8 years agoAdd test for assert_eq! with none Sized types
Oliver Middleton [Wed, 11 Nov 2015 22:08:20 +0000 (22:08 +0000)]
Add test for assert_eq! with none Sized types

8 years agoFix import warnings for stage0
Steve Klabnik [Wed, 11 Nov 2015 21:59:57 +0000 (16:59 -0500)]
Fix import warnings for stage0

8 years agoClean up the prelude docs
Steve Klabnik [Wed, 11 Nov 2015 20:22:23 +0000 (15:22 -0500)]
Clean up the prelude docs

This mostly brings them in line with existing linking convention, but
also has some minor re-wording.

The text at the top has been re-focused, by starting out with what the
prelude does, rather than starting from injecting std.

Also, it now mentions that other preludes exist.

Part of https://github.com/rust-lang/rust/issues/29369

8 years agoRewrite match algorithm to avoid massive blowup in generated code for
Niko Matsakis [Wed, 11 Nov 2015 17:54:02 +0000 (12:54 -0500)]
Rewrite match algorithm to avoid massive blowup in generated code for
large matches that fallback to Eq. When we encounter a case where the
test being performed does not inform the candidate at all, we just stop
testing the candidates at that point, rather than adding the candidate
to both outcomes. The former behavior was not WRONG, but it generated a
lot of code, whereas this new behavior degenerates to an if-else-if
tree.

Fixes #29740.

8 years agoAuto merge of #29778 - Manishearth:rollup, r=Manishearth
bors [Wed, 11 Nov 2015 20:39:49 +0000 (20:39 +0000)]
Auto merge of #29778 - Manishearth:rollup, r=Manishearth

- Successful merges: #29677, #29772, #29775, #29777
- Failed merges:

8 years agoFixup tidy
Manish Goregaokar [Wed, 11 Nov 2015 20:38:37 +0000 (02:08 +0530)]
Fixup tidy

8 years agoAdd -Zinput-stats
Nick Cameron [Wed, 11 Nov 2015 05:26:14 +0000 (18:26 +1300)]
Add -Zinput-stats

Emits loc, and node count - before and after expansion.

E.g.,

```
rustc: x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore
Lines of code:             32060
Pre-expansion node count:  120205
Post-expansion node count: 482749
```

8 years agoRollup merge of #29777 - Manishearth:const_irrefutable_diag, r=eddyb
Manish Goregaokar [Wed, 11 Nov 2015 19:29:31 +0000 (00:59 +0530)]
Rollup merge of #29777 - Manishearth:const_irrefutable_diag, r=eddyb

None

8 years agoRollup merge of #29775 - arcnmx:raw-c_char, r=alexcrichton
Manish Goregaokar [Wed, 11 Nov 2015 19:29:30 +0000 (00:59 +0530)]
Rollup merge of #29775 - arcnmx:raw-c_char, r=alexcrichton

It's a bit strange to expect users of `libstd` to require the use of an external crates.io crate to work with standard types. This commit encourages the use `os::raw::c_char` instead, although users are certainly free to use `libc::c_char` if they wish; the test still exists to ensure the two types are identical (though the reported bug only exists on platforms that are not officially tested).

Fixes #29774

8 years agoRollup merge of #29772 - banyan:fix-doc, r=steveklabnik
Manish Goregaokar [Wed, 11 Nov 2015 19:29:30 +0000 (00:59 +0530)]
Rollup merge of #29772 - banyan:fix-doc, r=steveklabnik

8 years agoRollup merge of #29677 - GuillaumeGomez:patch-3, r=Manishearth
Manish Goregaokar [Wed, 11 Nov 2015 19:29:30 +0000 (00:59 +0530)]
Rollup merge of #29677 - GuillaumeGomez:patch-3, r=Manishearth

r? @Manishearth
cc @AlisdairO

Part of #24407

8 years agoCleaner c_char cfg logic
arcnmx [Wed, 11 Nov 2015 19:25:18 +0000 (14:25 -0500)]
Cleaner c_char cfg logic

8 years agoAdd test for constant pattern diagnostics
Manish Goregaokar [Wed, 11 Nov 2015 19:18:02 +0000 (00:48 +0530)]
Add test for constant pattern diagnostics

8 years agoAdd more comprehensive diagnostics for irrefutable pattern error with constants
Manish Goregaokar [Wed, 11 Nov 2015 19:16:57 +0000 (00:46 +0530)]
Add more comprehensive diagnostics for irrefutable pattern error with constants

Fixes #7526

8 years agoPrefer raw::c_char or libc::c_char and fix arm
arcnmx [Wed, 11 Nov 2015 17:02:55 +0000 (12:02 -0500)]
Prefer raw::c_char or libc::c_char and fix arm

8 years agoAuto merge of #29763 - nikomatsakis:mir-29227, r=nikomatsakis
bors [Wed, 11 Nov 2015 16:50:48 +0000 (16:50 +0000)]
Auto merge of #29763 - nikomatsakis:mir-29227, r=nikomatsakis

The older algorithm was pretty inefficient for big matches. Fixes #29227. (On my computer, MIR construction on this test case goes from 9.9s to 0.025s.) Whereas before we had a loop like:

- for all outcomes of the test we are performing
    - for all candidates
        - check whether candidate is relevant to outcome

We now do:

- for all candidates
    - determine which outcomes the candidate is relevant to

Since the number of outcomes in this case is proportional to the number of candidates, the original algorithm turned out to be O(n^2), and the newer one is just O(n).

This PR also does some minor speedups by eagerly mirroring all patterns, so that we can just pass around `&Pattern<'tcx>`, which makes cloning cheaper. We could probably go a bit further in this direction.

r? @Aatch

8 years agodocs: Fix variable name
Kohei Hasegawa [Wed, 11 Nov 2015 15:47:42 +0000 (00:47 +0900)]
docs: Fix variable name

8 years agoAllow none Sized types in assert_eq!
Oliver Middleton [Wed, 11 Nov 2015 14:25:08 +0000 (14:25 +0000)]
Allow none Sized types in assert_eq!

format_args! doesn't support none Sized types so we should just pass it the references to left_val and right_val.

This fixes `assert_eq!([1, 2, 3][..], vec![1, 2, 3][..])` for example.

8 years agoAuto merge of #29650 - goyox86:goyox86/rustfmting-librustc_driverII, r=nikomatsakis
bors [Wed, 11 Nov 2015 14:14:23 +0000 (14:14 +0000)]
Auto merge of #29650 - goyox86:goyox86/rustfmting-librustc_driverII, r=nikomatsakis

Hi Rustaceans!

This is the secong take on running latest rustfmt on librustc_driver!

All fixups made in https://github.com/rust-lang/rust/pull/29033 were done (also rustfmt got better).

//cc @nrc

8 years agoIgnore long lines on this test.
Niko Matsakis [Wed, 11 Nov 2015 14:02:24 +0000 (09:02 -0500)]
Ignore long lines on this test.

8 years agoChange from `&mut Vec<Vec<_>>` to `&mut [Vec<_>]`, since the outer
Niko Matsakis [Wed, 11 Nov 2015 10:33:16 +0000 (05:33 -0500)]
Change from `&mut Vec<Vec<_>>` to `&mut [Vec<_>]`, since the outer
`Vec` should not be resized.

8 years agoAuto merge of #29755 - mbrubeck:stat-doc, r=steveklabnik
bors [Wed, 11 Nov 2015 11:09:43 +0000 (11:09 +0000)]
Auto merge of #29755 - mbrubeck:stat-doc, r=steveklabnik

Moved from #29753. r? @steveklabnik

8 years agoAuto merge of #29741 - Manishearth:fix-flowgraph, r=alexcrichton
bors [Wed, 11 Nov 2015 09:15:24 +0000 (09:15 +0000)]
Auto merge of #29741 - Manishearth:fix-flowgraph, r=alexcrichton

None

8 years agoAuto merge of #29752 - tamird:fix-compiletest-stage1, r=alexcrichton
bors [Wed, 11 Nov 2015 07:29:54 +0000 (07:29 +0000)]
Auto merge of #29752 - tamird:fix-compiletest-stage1, r=alexcrichton

Fixes #29751.

8 years agoAuto merge of #29744 - sanxiyn:modernize, r=nrc
bors [Wed, 11 Nov 2015 05:47:13 +0000 (05:47 +0000)]
Auto merge of #29744 - sanxiyn:modernize, r=nrc

8 years agoAuto merge of #29738 - sanxiyn:suggest-mut, r=nrc
bors [Wed, 11 Nov 2015 04:04:31 +0000 (04:04 +0000)]
Auto merge of #29738 - sanxiyn:suggest-mut, r=nrc

Fix #16410.

8 years agoAdd regression test for #29227.
Niko Matsakis [Wed, 11 Nov 2015 03:19:17 +0000 (22:19 -0500)]
Add regression test for #29227.

8 years agoReorganize match construction to be O(n) instead of O(n^2). Whereas
Niko Matsakis [Tue, 10 Nov 2015 22:11:39 +0000 (17:11 -0500)]
Reorganize match construction to be O(n) instead of O(n^2). Whereas
before we iterated over the test and each outcome thereof, and then
checked processed every candidate against this outcome, we now organize
the walk differently. Instead, we visit each candidate and say "Here is
the test being performed. Figure out the resulting candidates for each
possible outcome and add yourself into the appropriate places."

8 years agoClone the candidates and match-pairs lazilly, instead of eagerly.
Niko Matsakis [Tue, 10 Nov 2015 10:24:25 +0000 (05:24 -0500)]
Clone the candidates and match-pairs lazilly, instead of eagerly.

8 years agoRemove the mirroring for patterns and just convert them eagerly; then,
Niko Matsakis [Tue, 10 Nov 2015 01:54:17 +0000 (20:54 -0500)]
Remove the mirroring for patterns and just convert them eagerly; then,
pass around references instead of boxed values to save on clone costs.

8 years agoAuto merge of #29727 - alexcrichton:debug-unused-result, r=sfackler
bors [Wed, 11 Nov 2015 02:08:08 +0000 (02:08 +0000)]
Auto merge of #29727 - alexcrichton:debug-unused-result, r=sfackler

This should help avoid triggering the unused_results lint which can frequently
be turned on.

Closes #29710

8 years agoAuto merge of #29726 - petrochenkov:privsan, r=alexcrichton
bors [Wed, 11 Nov 2015 00:25:08 +0000 (00:25 +0000)]
Auto merge of #29726 - petrochenkov:privsan, r=alexcrichton

- Check privacy sanity in all blocks, not only function bodies
- Check all fields, not only named
- Check all impl items, not only methods
- Check default impls
- Move the sanity check in the beginning of privacy checking, so others could rely on it

Technically it's a [breaking-change], but I expect no breakage because, well, it's *sane* privacy visitor, if code is broken it must be insane by definition!

8 years agoAuto merge of #29725 - aturon:lang-features, r=huonw
bors [Tue, 10 Nov 2015 22:41:49 +0000 (22:41 +0000)]
Auto merge of #29725 - aturon:lang-features, r=huonw

This commit adds issue numbers to the vast majority of active feature
gates. The few that are left without issues are rustc/runtime-internal
features that are essentially private APIs.

Closes #28244

r? @huonw

8 years agouse Constant for repetition count in mir::Repeat
Simonas Kazlauskas [Tue, 10 Nov 2015 21:52:23 +0000 (23:52 +0200)]
use Constant for repetition count in mir::Repeat

8 years agoAuto merge of #29724 - alexcrichton:ip-endian, r=aturon
bors [Tue, 10 Nov 2015 20:58:51 +0000 (20:58 +0000)]
Auto merge of #29724 - alexcrichton:ip-endian, r=aturon

The comparison of IP addresses should happen not always in network endianness
but rather in the host endianness format, so be sure to convert to that before
comparing addresses.

There are still locations where the endianness will factor into visible
properties, such as the hash, but these are not important to be independent of
the endianness in play (as hash values are pretty undefined anyway.

Closes #29691

8 years agoManual fixups.
Jose Narvaez [Tue, 10 Nov 2015 20:49:12 +0000 (20:49 +0000)]
Manual fixups.

8 years agoRustfmting librustc_driver.
Jose Narvaez [Tue, 10 Nov 2015 20:48:44 +0000 (20:48 +0000)]
Rustfmting librustc_driver.

8 years ago[docs] Update references to renamed fs::stat function
Matt Brubeck [Tue, 10 Nov 2015 19:17:26 +0000 (11:17 -0800)]
[docs] Update references to renamed fs::stat function

8 years agoAuto merge of #29714 - petrochenkov:strparse, r=nrc
bors [Tue, 10 Nov 2015 19:15:08 +0000 (19:15 +0000)]
Auto merge of #29714 - petrochenkov:strparse, r=nrc

In particular, attributes are now parsed on fields of tuple variants

8 years agoAuto merge of #29749 - steveklabnik:rollup, r=steveklabnik
bors [Tue, 10 Nov 2015 17:30:50 +0000 (17:30 +0000)]
Auto merge of #29749 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #29420, #29688, #29708, #29715, #29729, #29731
- Failed merges: #29544

8 years agocompiletest/raise_fd_limit: use libc instead of custom impl
Tamir Duberstein [Tue, 10 Nov 2015 17:27:55 +0000 (12:27 -0500)]
compiletest/raise_fd_limit: use libc instead of custom impl

Fixes #29751.

8 years agoRollup merge of #29731 - steveklabnik:smallfix, r=alexcrichton
Steve Klabnik [Tue, 10 Nov 2015 15:51:48 +0000 (10:51 -0500)]
Rollup merge of #29731 - steveklabnik:smallfix, r=alexcrichton

* wrap to 80 cols
* small grammar fix, missing 'the'

8 years agoRollup merge of #29729 - brson:readme2, r=steveklabnik
Steve Klabnik [Tue, 10 Nov 2015 15:51:48 +0000 (10:51 -0500)]
Rollup merge of #29729 - brson:readme2, r=steveklabnik

r? @steveklabnik

This completely abdicates any responsibility to explain what Rust is, instead linking to the website.

My main motivation is that I am still not happy with it, and every time I try to fix it I just write a slightly longer sales pitch than what's on the website.

One thing this paragraph could do is direct people to more information about what is in the repo, or more technical information about the implementation.

8 years agoRollup merge of #29715 - defuz:patch-3, r=alexcrichton
Steve Klabnik [Tue, 10 Nov 2015 15:51:48 +0000 (10:51 -0500)]
Rollup merge of #29715 - defuz:patch-3, r=alexcrichton

r? @steveklabnik

See #27305

8 years agoRollup merge of #29708 - Ryman:pathdoc, r=steveklabnik
Steve Klabnik [Tue, 10 Nov 2015 15:51:48 +0000 (10:51 -0500)]
Rollup merge of #29708 - Ryman:pathdoc, r=steveklabnik

r? @steveklabnik

8 years agoRollup merge of #29688 - stepancheg:vec-outdated, r=nikomatsakis
Steve Klabnik [Tue, 10 Nov 2015 15:51:47 +0000 (10:51 -0500)]
Rollup merge of #29688 - stepancheg:vec-outdated, r=nikomatsakis

Since commit 46068c9da, call to `reserve()` on empty vec allocates
exactly requested capacity, so unroll of first iteration may help only
with branch prediction.

8 years agoRollup merge of #29420 - efindlay:master, r=steveklabnik
Steve Klabnik [Tue, 10 Nov 2015 15:51:47 +0000 (10:51 -0500)]
Rollup merge of #29420 - efindlay:master, r=steveklabnik

r? @steveklabnik

8 years agoAuto merge of #29705 - Ryman:mismatched_typaram_counts, r=alexcrichton
bors [Tue, 10 Nov 2015 15:48:00 +0000 (15:48 +0000)]
Auto merge of #29705 - Ryman:mismatched_typaram_counts, r=alexcrichton

…type-params for methods

8 years agoAuto merge of #29697 - dotdash:mir_trans_switchint, r=nikomatsakis
bors [Tue, 10 Nov 2015 13:17:15 +0000 (13:17 +0000)]
Auto merge of #29697 - dotdash:mir_trans_switchint, r=nikomatsakis

8 years agoUse lifetime elision
Seo Sanghyeon [Tue, 10 Nov 2015 11:42:00 +0000 (20:42 +0900)]
Use lifetime elision

8 years agoAuto merge of #29699 - tamird:valgrind-supp, r=alexcrichton
bors [Tue, 10 Nov 2015 11:34:13 +0000 (11:34 +0000)]
Auto merge of #29699 - tamird:valgrind-supp, r=alexcrichton

Quite a bit of cruft in the valgrind suppressions. I started from a clean slate and found a few unique failures; this commit also moves the tests "fixed" by these suppressions into run-pass-valgrind.

8 years agoUse deref coercions
Seo Sanghyeon [Tue, 10 Nov 2015 11:16:28 +0000 (20:16 +0900)]
Use deref coercions

8 years agoUse exhaustive matching
Vadim Petrochenkov [Tue, 10 Nov 2015 09:51:56 +0000 (12:51 +0300)]
Use exhaustive matching

8 years agoFix help text for flowgraph debug options
Manish Goregaokar [Tue, 10 Nov 2015 09:19:36 +0000 (14:49 +0530)]
Fix help text for flowgraph debug options

8 years agoAuto merge of #29647 - goyox86:goyox86/rustfmting-librustc_frontII, r=nrc
bors [Tue, 10 Nov 2015 08:38:52 +0000 (08:38 +0000)]
Auto merge of #29647 - goyox86:goyox86/rustfmting-librustc_frontII, r=nrc

Hi Rustaceans!

This is the second take  on running latest rustfmt on librustc_front!

This is the same in https://github.com/rust-lang/rust/pull/29075 but cleaned. All fixups have been applied.

//cc @nrc

8 years agoAuto merge of #29546 - alexcrichton:new-libc, r=brson
bors [Tue, 10 Nov 2015 06:56:30 +0000 (06:56 +0000)]
Auto merge of #29546 - alexcrichton:new-libc, r=brson

This commit replaces the in-tree liblibc with the [external clone](https://github.com/rust-lang-nursery/libc) which has no evolved beyond the in-tree version in light of its [recent redesign](https://github.com/rust-lang/rfcs/pull/1291).

The primary changes here are:

* `src/liblibc/lib.rs` was deleted
* `src/liblibc` is now a submodule pointing at the external repository
* `src/libstd/sys/unix/{c.rs,sync.rs}` were both deleted having all bindings folded into the external liblibc.
* Many ad-hoc `extern` blocks in the standard library were removed in favor of bindings now being in the external liblibc.
* Many functions/types were added to `src/libstd/sys/windows/c.rs`, and the scattered definitions throughout the standard library were consolidated here.

At the API level this commit is **not a breaking change**, although it is only very lightly tested on the *BSD variants and is probably going to break almost all of their builds! Follow-up commits to liblibc should in theory be all that's necessary to get the build working on the *BSDs again.

8 years agostd: Migrate to the new libc
Alex Crichton [Tue, 3 Nov 2015 00:23:22 +0000 (16:23 -0800)]
std: Migrate to the new libc

* Delete `sys::unix::{c, sync}` as these are now all folded into libc itself
* Update all references to use `libc` as a result.
* Update all references to the new flat namespace.
* Moves all windows bindings into sys::c

8 years agoSuggest `mut` for mutability errors
Seo Sanghyeon [Tue, 10 Nov 2015 03:58:52 +0000 (12:58 +0900)]
Suggest `mut` for mutability errors

8 years agolibc: Replace liblibc with crates.io libc
Alex Crichton [Tue, 3 Nov 2015 00:22:49 +0000 (16:22 -0800)]
libc: Replace liblibc with crates.io libc

8 years agoSome cleanup on after #29684
Steve Klabnik [Tue, 10 Nov 2015 00:39:23 +0000 (01:39 +0100)]
Some cleanup on after #29684

* wrap to 80 cols
* small grammar fix, missing 'the'

8 years agoAdd E0321 error explanation
Guillaume Gomez [Mon, 9 Nov 2015 23:38:07 +0000 (00:38 +0100)]
Add E0321 error explanation

8 years agoRustfmting librustc_front (again).
Jose Narvaez [Thu, 5 Nov 2015 21:17:59 +0000 (21:17 +0000)]
Rustfmting librustc_front (again).

8 years agoRedo the README intro again
Brian Anderson [Mon, 9 Nov 2015 21:22:16 +0000 (13:22 -0800)]
Redo the README intro again

8 years agoUse enum ParsePub instead of bool in field parsing + typo
Vadim Petrochenkov [Mon, 9 Nov 2015 19:34:15 +0000 (22:34 +0300)]
Use enum ParsePub instead of bool in field parsing + typo