]> git.lizzy.rs Git - rust.git/log
rust.git
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 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 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 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 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

8 years agoImprove error message
Vadim Petrochenkov [Mon, 9 Nov 2015 19:16:30 +0000 (22:16 +0300)]
Improve error message

8 years agosyntax: Use `let _` in #[derive(Debug)]
Alex Crichton [Mon, 9 Nov 2015 18:02:39 +0000 (10:02 -0800)]
syntax: Use `let _` in #[derive(Debug)]

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

Closes #29710

8 years agorustc_privacy: Fix bugs in SanePrivacyVisitor
Vadim Petrochenkov [Mon, 9 Nov 2015 18:15:53 +0000 (21:15 +0300)]
rustc_privacy: Fix bugs in SanePrivacyVisitor

8 years agostd: Fix endianness in Ord for IP addresses
Alex Crichton [Mon, 9 Nov 2015 17:11:16 +0000 (09:11 -0800)]
std: Fix endianness in Ord for IP addresses

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 agoTag feature gates with issues
Aaron Turon [Mon, 9 Nov 2015 17:09:25 +0000 (09:09 -0800)]
Tag feature gates with issues

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

8 years ago[MIR trans] Add support for SwitchInt
Björn Steinbrink [Sun, 8 Nov 2015 18:11:11 +0000 (19:11 +0100)]
[MIR trans] Add support for SwitchInt

8 years agoDoc: Fix broken link on for-loop.html
Ivan Ivaschenko [Mon, 9 Nov 2015 15:49:30 +0000 (17:49 +0200)]
Doc: Fix broken link on for-loop.html

8 years agosyntax: Merge parsing code for structures and variants
Vadim Petrochenkov [Mon, 9 Nov 2015 15:43:32 +0000 (18:43 +0300)]
syntax: Merge parsing code for structures and variants

8 years agoAuto merge of #29713 - apasel422:executable, r=dotdash
bors [Mon, 9 Nov 2015 15:04:24 +0000 (15:04 +0000)]
Auto merge of #29713 - apasel422:executable, r=dotdash

8 years agoRemove executable permission from .rs files
Andrew Paseltiner [Mon, 9 Nov 2015 14:28:51 +0000 (09:28 -0500)]
Remove executable permission from .rs files

8 years agoAuto merge of #29695 - dtrebbien:remove-mention-of-struct_variant-feature, r=sanxiyn
bors [Mon, 9 Nov 2015 11:14:26 +0000 (11:14 +0000)]
Auto merge of #29695 - dtrebbien:remove-mention-of-struct_variant-feature, r=sanxiyn

The struct_variant feature was accepted and is no longer feature gated.
See #19122, #19124

§6.1.6 Enumerations shows an example of a struct-like enum variant.

8 years agoAuto merge of #29682 - Ryman:dead_spam, r=sanxiyn
bors [Mon, 9 Nov 2015 08:28:35 +0000 (08:28 +0000)]
Auto merge of #29682 - Ryman:dead_spam, r=sanxiyn

This standardises the current behavior to match `enum` variants, hopefully leading to less warning spam for users!

For example the code below will have 2 warnings (for `Foo` and `Bar`) rather than 7:
```rust
enum Foo {
    A,
    B { a: String, b: isize },
    C
}

struct Bar {
    a: i32,
    b: String,
    c: ()
}

fn main() {
    println!("Hi")
}
```
http://is.gd/zAztKW

8 years agolibstd: add example for PathBuf::push
Kevin Butler [Mon, 9 Nov 2015 03:42:22 +0000 (03:42 +0000)]
libstd: add example for PathBuf::push

8 years agolibrustc_typeck: give more information when supplied wrong number of type-params...
Kevin Butler [Mon, 9 Nov 2015 00:11:56 +0000 (00:11 +0000)]
librustc_typeck: give more information when supplied wrong number of type-params for methods

8 years agoAuto merge of #29684 - stepancheg:size-hint, r=Gankro
bors [Sun, 8 Nov 2015 22:01:44 +0000 (22:01 +0000)]
Auto merge of #29684 - stepancheg:size-hint, r=Gankro

* `size_hint()` cannot be relied upon to perform memory unsafe operations

Same applies to `len()` function of `ExactSizeIterator` trait.

8 years agoAuto merge of #29686 - jrburke:docs-error-handling-search-case, r=BurntSushi
bors [Sun, 8 Nov 2015 20:20:16 +0000 (20:20 +0000)]
Auto merge of #29686 - jrburke:docs-error-handling-search-case, r=BurntSushi

In src/doc/trpl/error-handling.md, in this section:

It mentions three steps, to "convert this to proper error handling", the last one being:

3. Handle the error in main.

However, it is not shown. This pull request adds a code example showing how `main`'s call to `search` should use case analysis. I am still very much new to learning Rust, so this may not be idiomatic. Happy to make changes with guidance.

8 years agoAuto merge of #29690 - tbu-:pr_doc_env_home_dir, r=Manishearth
bors [Sun, 8 Nov 2015 18:37:18 +0000 (18:37 +0000)]
Auto merge of #29690 - tbu-:pr_doc_env_home_dir, r=Manishearth

8 years agovalgrind: update suppressions and move interesting tests
Tamir Duberstein [Mon, 2 Nov 2015 04:40:10 +0000 (23:40 -0500)]
valgrind: update suppressions and move interesting tests

8 years agoprint the unexpected character
Tamir Duberstein [Mon, 2 Nov 2015 16:19:27 +0000 (11:19 -0500)]
print the unexpected character

8 years agoExplain that size_hint cannot be trusted
Stepan Koltsov [Sun, 8 Nov 2015 02:30:21 +0000 (05:30 +0300)]
Explain that size_hint cannot be trusted

Same applies to `len()` function of `ExactSizeIterator` trait.

8 years agodoc: error-handling.md: main case analysis for search
jrburke [Sun, 8 Nov 2015 05:36:57 +0000 (21:36 -0800)]
doc: error-handling.md: main case analysis for search

8 years agoreference: Remove struct_variant from Compiler Features
Daniel Trebbien [Sun, 8 Nov 2015 16:27:40 +0000 (11:27 -0500)]
reference: Remove struct_variant from Compiler Features

The struct_variant feature was accepted and is no longer feature gated.
See #19122, #19124

§6.1.6 Enumerations shows an example of a struct-like enum variant.

8 years agoAuto merge of #29692 - jwworth:pull-request/fix-typo, r=apasel422
bors [Sun, 8 Nov 2015 15:56:03 +0000 (15:56 +0000)]
Auto merge of #29692 - jwworth:pull-request/fix-typo, r=apasel422

Fixes the double word 'be'.

8 years agoFix double word 'be'
Jake Worth [Sun, 8 Nov 2015 15:39:01 +0000 (09:39 -0600)]
Fix double word 'be'

8 years agoSpell out the fallback of `std::env::home_dir` on POSIX
Tobias Bucher [Sun, 8 Nov 2015 15:34:16 +0000 (15:34 +0000)]
Spell out the fallback of `std::env::home_dir` on POSIX

8 years agoFix outdated comment in Vec::from_iter
Stepan Koltsov [Sun, 8 Nov 2015 14:17:02 +0000 (17:17 +0300)]
Fix outdated comment in Vec::from_iter

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 agojemalloc: pass `--enable-valgrind` when valgrind is enabled
Tamir Duberstein [Mon, 2 Nov 2015 15:39:46 +0000 (10:39 -0500)]
jemalloc: pass `--enable-valgrind` when valgrind is enabled

8 years agojemalloc: quarantine is fixed
Tamir Duberstein [Mon, 2 Nov 2015 12:56:09 +0000 (07:56 -0500)]
jemalloc: quarantine is fixed