]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agorustbuild: set __CARGO_DEFAULT_LIB_METADATA to channel
Marc-Antoine Perennou [Thu, 29 Jun 2017 08:03:56 +0000 (10:03 +0200)]
rustbuild: set __CARGO_DEFAULT_LIB_METADATA to channel

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
7 years agoAuto merge of #42924 - pnkfelix:mir-dataflow, r=arielb1
bors [Fri, 30 Jun 2017 03:56:33 +0000 (03:56 +0000)]
Auto merge of #42924 - pnkfelix:mir-dataflow, r=arielb1

Shift mir-dataflow from `rustc_borrowck` to `rustc_mir` crate.

Shift mir-dataflow from `rustc_borrowck` to `rustc_mir` crate.

Turn `elaborate_drops` and `rustc_peek` implementations into MIR passes that also live in `rustc_mir` crate.

Rewire things so `rustc_driver` uses the `ElaborateDrops` from `rustc_mir` crate.

(This PR is another baby step for mir-borrowck; it is a piece of work that other people want to rebase their stuff on top of, namely developers who are doing other dataflow analyses on top of MIR.)

I have deliberately architected this PR in an attempt to minimize the number of actual code changes. The majority of the diff should be little more than changes to mod and use declarations, as well as a few visibility promotions to pub(crate) when a declaration was moved downward in the module hierarchy.

(I have no problem with other PR's that move declarations around to try to clean this up; my goal was to ensure that the diff here was as small as possible, to make the review nearly trivial.)

7 years agoAuto merge of #42902 - petrochenkov:keydcrate, r=jseyfried
bors [Thu, 29 Jun 2017 23:48:17 +0000 (23:48 +0000)]
Auto merge of #42902 - petrochenkov:keydcrate, r=jseyfried

Make `$crate` a keyword

Fixes https://github.com/rust-lang/rust/issues/42898

r? @jseyfried or @nrc

7 years agoAuto merge of #42900 - sfackler:jemalloc-tweak, r=alexcrichton
bors [Thu, 29 Jun 2017 20:04:14 +0000 (20:04 +0000)]
Auto merge of #42900 - sfackler:jemalloc-tweak, r=alexcrichton

Stop disabling fill in jemalloc

The underlying bug has been fixed for over 2 years!

r? @alexcrichton

7 years agoAuto merge of #42527 - qnighy:unsized-tuple-coercions, r=arielb1
bors [Thu, 29 Jun 2017 15:04:31 +0000 (15:04 +0000)]
Auto merge of #42527 - qnighy:unsized-tuple-coercions, r=arielb1

Unsized tuple coercions

Part of #18469. Fixes #32702.

#37685 and #34451 might also be related.

This PR does the following:

- Introduce explicit `Sized` constraints on tuple initializers, similar to that of record-struct initializers. Not much relevant to the main contribution but I noticed this when making tests for unsized tuple coercions.
- Implement `(.., T): Unsize<(.., U)>` where `T: Unsize<U>`.
- Assume `(.., T)` is MaybeUnsizedUnivariant.
- Modify `src/librustc/ty/util.rs` and `src/librustc_trans/glue.rs` so that tuples and structs are uniformly traversed when translating.

7 years agoCorrect comments about unsizing regarding #40319.
Masaki Hara [Thu, 29 Jun 2017 11:00:31 +0000 (20:00 +0900)]
Correct comments about unsizing regarding #40319.

7 years agoGive a tracking-issue number for unsized tuple coercion.
Masaki Hara [Sat, 24 Jun 2017 22:32:00 +0000 (07:32 +0900)]
Give a tracking-issue number for unsized tuple coercion.

7 years agoMove unsized_tuple_coercion behind a feature gate.
Masaki Hara [Sat, 24 Jun 2017 07:20:27 +0000 (16:20 +0900)]
Move unsized_tuple_coercion behind a feature gate.

7 years agoSplit dst-dtor-{1,2} tests into four.
Masaki Hara [Wed, 14 Jun 2017 03:27:51 +0000 (12:27 +0900)]
Split dst-dtor-{1,2} tests into four.

7 years agoAdd unsized tuple coercions.
Masaki Hara [Thu, 8 Jun 2017 05:49:54 +0000 (14:49 +0900)]
Add unsized tuple coercions.

7 years agoCheck explicitly that tuple initializer is Sized.
Masaki Hara [Thu, 8 Jun 2017 05:46:46 +0000 (14:46 +0900)]
Check explicitly that tuple initializer is Sized.

7 years agoChange some terminology around keywords and reserved identifiers
petrochenkov [Thu, 29 Jun 2017 10:16:35 +0000 (13:16 +0300)]
Change some terminology around keywords and reserved identifiers

7 years agoMake `$crate` a keyword
Vadim Petrochenkov [Sun, 25 Jun 2017 17:34:49 +0000 (20:34 +0300)]
Make `$crate` a keyword

7 years agoAuto merge of #42887 - GuillaumeGomez:remove-err-methods, r=nikomatsakis
bors [Thu, 29 Jun 2017 11:13:39 +0000 (11:13 +0000)]
Auto merge of #42887 - GuillaumeGomez:remove-err-methods, r=nikomatsakis

Remove err methods

To be merged after #42519.

cc @Susurrus @QuietMisdreavus

7 years agoAuto merge of #42964 - arielb1:rollup, r=arielb1
bors [Thu, 29 Jun 2017 08:40:39 +0000 (08:40 +0000)]
Auto merge of #42964 - arielb1:rollup, r=arielb1

Rollup of 12 pull requests

- Successful merges: #42219, #42831, #42832, #42884, #42886, #42901, #42919, #42920, #42946, #42953, #42955, #42958
- Failed merges:

7 years agoRollup merge of #42958 - aidanhs:aphs-better-stamping, r=Mark-Simulacrum
Ariel Ben-Yehuda [Thu, 29 Jun 2017 08:40:13 +0000 (08:40 +0000)]
Rollup merge of #42958 - aidanhs:aphs-better-stamping, r=Mark-Simulacrum

Better timestamps in builds

r? @Mark-Simulacrum

7 years agoRollup merge of #42955 - matklad:doc-path, r=steveklabnik
Ariel Ben-Yehuda [Thu, 29 Jun 2017 08:40:12 +0000 (08:40 +0000)]
Rollup merge of #42955 - matklad:doc-path, r=steveklabnik

Document that `/` works as separator on Windows

Hi Whenever I see code like `Path::new("./src/bin/main.rs")` or `path.ends_with("foo/bar")`, I wonder if it will work on Windows as I expect. Unfortunately, reading the current docs does not help to answer this question, because all examples are Unix-specific.

However, I believe that using `/` is fine, because both Windows itself [and Rust stdlib](https://github.com/rust-lang/rust/blob/47faf1d51952ecd9d4c8a7325332fba34fbe00bd/src/libstd/sys/windows/path.rs#L26) do treat it as a file separator, and because it is [actually used](https://github.com/rust-lang/cargo/blob/abf01e1eddb3145c83f71b469ea7bee37141e5e1/tests/git.rs#L579) in Cargo. So looks like we can just document it?

r? @steveklabnik

cc @retep998 I don't actually program for windows that much, so I might be totally wrong, and perhaps we should advise to always use (allocating) `.join` method to construct paths of more than one component?

7 years agoRollup merge of #42953 - estebank:fix-20729, r=petrochenkov
Ariel Ben-Yehuda [Thu, 29 Jun 2017 08:40:10 +0000 (08:40 +0000)]
Rollup merge of #42953 - estebank:fix-20729, r=petrochenkov

Move type parameter shadowing test to `ui`

Fix #20729.

7 years agoRollup merge of #42946 - AndiDog:patch-1, r=GuillaumeGomez
Ariel Ben-Yehuda [Thu, 29 Jun 2017 08:40:09 +0000 (08:40 +0000)]
Rollup merge of #42946 - AndiDog:patch-1, r=GuillaumeGomez

compile-error.md: Fix link reference

Was a copy-paste mistake, I guess

7 years agoRollup merge of #42920 - behnam:cmp, r=BurntSushi
Ariel Ben-Yehuda [Thu, 29 Jun 2017 08:40:08 +0000 (08:40 +0000)]
Rollup merge of #42920 - behnam:cmp, r=BurntSushi

[libcore/cmp] Expand Ord/PartialOrd Derivable doc for enum types

Expand Derivable docblock section for `Ord` and `PartialOrd` to cover
`enum` types, in addition to the existing language explaining it for
`struct` types.

7 years agoRollup merge of #42919 - zackmdavis:once_again_we_heard_you_the_first_time, r=eddyb
Ariel Ben-Yehuda [Thu, 29 Jun 2017 08:40:07 +0000 (08:40 +0000)]
Rollup merge of #42919 - zackmdavis:once_again_we_heard_you_the_first_time, r=eddyb

make lint on-by-default/implied-by messages appear only once

From review discussion on #38103 (https://github.com/rust-lang/rust/pull/38103#discussion_r94845060).

![we_heard](https://user-images.githubusercontent.com/1076988/27564103-6284b78e-5a8a-11e7-9d35-f7f297ca9573.png)

r? @nikomatsakis

7 years agoRollup merge of #42901 - alexcrichton:alloc-one, r=sfackler
Ariel Ben-Yehuda [Thu, 29 Jun 2017 08:40:06 +0000 (08:40 +0000)]
Rollup merge of #42901 - alexcrichton:alloc-one, r=sfackler

std: Fix implementation of `Alloc::alloc_one`

This had an accidental `u8 as *mut T` where it was intended to have just a
normal pointer-to-pointer cast.

Closes #42827

7 years agoRollup merge of #42886 - durka:pplmm-mwe, r=petrochenkov
Ariel Ben-Yehuda [Thu, 29 Jun 2017 08:40:05 +0000 (08:40 +0000)]
Rollup merge of #42886 - durka:pplmm-mwe, r=petrochenkov

syntax: allow negative integer literal expression to be interpolated as pattern

Fixes #42820.

r? @jseyfried

7 years agoRollup merge of #42884 - stepancheg:set-env-run-pass, r=alexcrichton
Ariel Ben-Yehuda [Thu, 29 Jun 2017 08:40:04 +0000 (08:40 +0000)]
Rollup merge of #42884 - stepancheg:set-env-run-pass, r=alexcrichton

Move global vars changing tests into run-pass

Should fix race #42795

7 years agoRollup merge of #42832 - rthomas:doc-fmt, r=steveklabnik
Ariel Ben-Yehuda [Thu, 29 Jun 2017 08:40:03 +0000 (08:40 +0000)]
Rollup merge of #42832 - rthomas:doc-fmt, r=steveklabnik

Update docs for std::fmt::format #29355.

This rewords and removes the `Arguments` section from the docs for
fmt::format.

r? @steveklabnik

7 years agoRollup merge of #42831 - rthomas:master, r=QuietMisdreavus
Ariel Ben-Yehuda [Thu, 29 Jun 2017 08:40:02 +0000 (08:40 +0000)]
Rollup merge of #42831 - rthomas:master, r=QuietMisdreavus

Update docs for fmt::write.

#29355

I reworded it slightly to make it more clear that the function only take
two arguments - the output and the Arguments struct that can be
generated from the format_args! macro.

r? @steveklabnik

7 years agoRollup merge of #42219 - pwoolcoc:add-allow-fail-to-libtest, r=GuillaumeGomez
Ariel Ben-Yehuda [Thu, 29 Jun 2017 08:40:01 +0000 (08:40 +0000)]
Rollup merge of #42219 - pwoolcoc:add-allow-fail-to-libtest, r=GuillaumeGomez

add `allow_fail` test attribute

This change allows the user to add an `#[allow_fail]` attribute to
tests that will cause the test to compile & run, but if the test fails
it will not cause the entire test run to fail. The test output will
show the failure, but in yellow instead of red, and also indicate that
it was an allowed failure.

Here is an example of the output: http://imgur.com/a/wt7ga

7 years agoImprove long error explanations for E0620 and E0621
Guillaume Gomez [Tue, 27 Jun 2017 21:07:56 +0000 (23:07 +0200)]
Improve long error explanations for E0620 and E0621

7 years agoRemove unused methods
Guillaume Gomez [Sat, 24 Jun 2017 21:24:07 +0000 (23:24 +0200)]
Remove unused methods

7 years agoAdd E0620
Guillaume Gomez [Sat, 24 Jun 2017 21:23:47 +0000 (23:23 +0200)]
Add E0620

7 years agoAdd E0619
Guillaume Gomez [Sat, 24 Jun 2017 20:26:45 +0000 (22:26 +0200)]
Add E0619

7 years agoAuto merge of #42848 - ids1024:redox-fix, r=sfackler
bors [Thu, 29 Jun 2017 06:20:17 +0000 (06:20 +0000)]
Auto merge of #42848 - ids1024:redox-fix, r=sfackler

Fix Redox build, broken in ecbb896b9eb2acadefde57be493e4298c1aa04a3

7 years agoAuto merge of #42642 - venkatagiri:issue_42312, r=nikomatsakis
bors [Thu, 29 Jun 2017 02:30:53 +0000 (02:30 +0000)]
Auto merge of #42642 - venkatagiri:issue_42312, r=nikomatsakis

rustc_typeck: enforce argument type is sized

closes #42312

r? @nikomatsakis

7 years agoAuto merge of #42797 - arielb1:ex-falso-ice, r=nikomatsakis
bors [Wed, 28 Jun 2017 23:58:11 +0000 (23:58 +0000)]
Auto merge of #42797 - arielb1:ex-falso-ice, r=nikomatsakis

avoid translating roots with predicates that do not hold

Finally I got around to doing this.

Fixes #37725.

r? @nikomatsakis

7 years agoRecord some details to help with possible bad clocks
Aidan Hobson Sayers [Wed, 28 Jun 2017 22:05:29 +0000 (23:05 +0100)]
Record some details to help with possible bad clocks

7 years agoMove type parameter shadowing test to `ui`
Esteban Küber [Wed, 28 Jun 2017 18:09:00 +0000 (11:09 -0700)]
Move type parameter shadowing test to `ui`

7 years agoStamp the whole build script
Aidan Hobson Sayers [Wed, 28 Jun 2017 21:54:05 +0000 (22:54 +0100)]
Stamp the whole build script

7 years agoadd comments
Ariel Ben-Yehuda [Wed, 28 Jun 2017 20:50:24 +0000 (23:50 +0300)]
add comments

7 years agorustc_typeck: use body-id of type-checking item in need_type_info
Venkata Giri Reddy [Wed, 28 Jun 2017 16:26:36 +0000 (16:26 +0000)]
rustc_typeck: use body-id of type-checking item in need_type_info

7 years agoAuto merge of #42850 - estebank:unwanted-return-rotj, r=nikomatsakis
bors [Wed, 28 Jun 2017 20:16:13 +0000 (20:16 +0000)]
Auto merge of #42850 - estebank:unwanted-return-rotj, r=nikomatsakis

Detect missing `;` on methods with return type `()`

 - Point out the origin of a type requirement when it is the return type
   of a method
 - Point out possibly missing semicolon when the return type is `()` and
   the implicit return makes sense as a statement
 - Suggest changing the return type of methods with default return type
 - Don't suggest changing the return type on `fn main()`
 - Don't suggest changing the return type on impl fn
 - Suggest removal of semicolon (instead of being help)

7 years agoDocument that `/` works as separator on Windows
Aleksey Kladov [Wed, 28 Jun 2017 20:14:06 +0000 (23:14 +0300)]
Document that `/` works as separator on Windows

7 years agorustc_typeck: enforce argument type is sized
Venkata Giri Reddy [Tue, 13 Jun 2017 20:22:28 +0000 (20:22 +0000)]
rustc_typeck: enforce argument type is sized

7 years agorustc_typeck: remove old-style WF obligation
Venkata Giri Reddy [Tue, 13 Jun 2017 20:14:23 +0000 (20:14 +0000)]
rustc_typeck: remove old-style WF obligation

7 years agoAuto merge of #42819 - scottmcm:swap-nonoverlapping, r=sfackler
bors [Wed, 28 Jun 2017 14:33:00 +0000 (14:33 +0000)]
Auto merge of #42819 - scottmcm:swap-nonoverlapping, r=sfackler

Reuse the mem::swap optimizations to speed up slice::rotate

This is most helpful for compound types where LLVM didn't vectorize the loop.  Highlight: bench slice::rotate_medium_by727_strings gets 38% faster.

Exposes the swapping logic from PR https://github.com/rust-lang/rust/pull/40454 as `pub unsafe fn ptr::swap_nonoverlapping` under library feature `swap_nonoverlapping` https://github.com/rust-lang/rust/issues/42818.

(The new method seemed plausible, and was the simplest way to share the logic.  I'm not attached to it, though, so let me know if a different way would be better.)

7 years agoShift mir-dataflow from `rustc_borrowck` to `rustc_mir` crate.
Felix S. Klock II [Mon, 26 Jun 2017 12:57:26 +0000 (14:57 +0200)]
Shift mir-dataflow from `rustc_borrowck` to `rustc_mir` crate.

Turn `elaborate_drops` and `rustc_peek` implementations into MIR
passes that also live in `rustc_mir` crate.

Rewire things so `rustc_driver` uses the `ElaborateDrops` from
`rustc_mir` crate.

7 years agoAuto merge of #42745 - sfackler:1.19-stabilization, r=alexcrichton
bors [Wed, 28 Jun 2017 11:55:37 +0000 (11:55 +0000)]
Auto merge of #42745 - sfackler:1.19-stabilization, r=alexcrichton

1.19 stabilization

r? @alexcrichton

7 years agoFix link reference
Andreas Sommer [Wed, 28 Jun 2017 08:55:57 +0000 (10:55 +0200)]
Fix link reference

7 years agoAuto merge of #42931 - arielb1:statement-visitor, r=eddyb
bors [Wed, 28 Jun 2017 08:47:29 +0000 (08:47 +0000)]
Auto merge of #42931 - arielb1:statement-visitor, r=eddyb

re-add the call to `super_statement` in EraseRegions

The move gathering code is sensitive to type-equality - that is rather
un-robust and I plan to fix it eventually, but that's a more invasive
change. And we want to fix the visitor anyway.

Fixes #42903.

r? @eddyb

7 years agore-add the call to `super_statement` in EraseRegions
Ariel Ben-Yehuda [Tue, 27 Jun 2017 15:34:07 +0000 (18:34 +0300)]
re-add the call to `super_statement` in EraseRegions

The move gathering code is sensitive to type-equality - that is rather
un-robust and I plan to fix it eventually, but that's a more invasive
change. And we want to fix the visitor anyway.

Fixes #42903.

7 years agoAuto merge of #42709 - stepancheg:discriminant-hash, r=jseyfried
bors [Wed, 28 Jun 2017 06:32:10 +0000 (06:32 +0000)]
Auto merge of #42709 - stepancheg:discriminant-hash, r=jseyfried

deriv(Hash) for single-variant enum should not hash discriminant

Fixes #39137

7 years agoAuto merge of #42431 - nagisa:core-float-2, r=alexcrichton
bors [Wed, 28 Jun 2017 03:41:22 +0000 (03:41 +0000)]
Auto merge of #42431 - nagisa:core-float-2, r=alexcrichton

Fix NaN handling in is_sign_negative/positive

This would be my proposed fix for the #42425 provided we decide it is indeed a problem.

Note this would technically be a breaking change to a stable API. We might want to consider deprecating these methods and adding new ones.

7 years agoAuto merge of #42417 - eddyb:separate-fn-sig, r=nikomatsakis
bors [Wed, 28 Jun 2017 01:12:12 +0000 (01:12 +0000)]
Auto merge of #42417 - eddyb:separate-fn-sig, r=nikomatsakis

Don't drag function signatures along function item types.

This PR separates the signature of a function from the "function item type" (`TyFnDef`), leaving only the `DefId` and parameter `Substs`, making them even more like (captureless) closure types.

The motivation for this change is reducing typesystem complexity, and its consequences:
* operating on the signature instead of just the parameters was less efficient
  * specifically, signatures can easily add several levels of depth on top of the parameter types
  * and the signatured were always substituted and normalized, so typically even more complex
* it was *the only* type that was *both* nominal (identity) and structural (signature)
  * harder to model in Chalk than either a purely nominal or structural type
  * subtyping worked on the signature but parameters were always invariant
  * call type-checking was transforming signatures but keeping the nominal half intact
  * the signature could therefore get out of sync during type inference in several ways

That last point comes with a `[breaking-change]`, because functions with `'static` in their return types will now *not* be as usable as if they were using lifetime parameters instead:
```rust
// Will cause lifetime mismatch in main after this PR.
fn bar() -> &'static str { "bar" }
// Will continue to work fine, as every use can choose its own lifetime.
fn bar<'a>() -> &'a str { "bar" }

fn main() {
    let s = String::from("foo");
    Some(&s[..]).unwrap_or_else(bar);
}
```

r? @nikomatsakis

7 years agoReview comments
Esteban Küber [Tue, 27 Jun 2017 20:34:56 +0000 (13:34 -0700)]
Review comments

- Fix typo
- Add docstring
- Remove spurious test output file

7 years agosyntax: allow negative integer literal expression to be interpolated as pattern
Alex Burka [Sat, 24 Jun 2017 18:26:04 +0000 (18:26 +0000)]
syntax: allow negative integer literal expression to be interpolated as pattern

7 years agotests: work around fallout from normalizing signatures separately.
Eduard-Mihai Burtescu [Fri, 2 Jun 2017 19:12:01 +0000 (22:12 +0300)]
tests: work around fallout from normalizing signatures separately.

7 years agorustc_typeck: support functions in variance computation.
Eduard-Mihai Burtescu [Fri, 2 Jun 2017 19:05:41 +0000 (22:05 +0300)]
rustc_typeck: support functions in variance computation.

7 years agorustc: move the PolyFnSig out of TyFnDef.
Eduard-Mihai Burtescu [Sat, 13 May 2017 14:11:52 +0000 (17:11 +0300)]
rustc: move the PolyFnSig out of TyFnDef.

7 years agorustc: rename closure_type to fn_sig.
Eduard-Mihai Burtescu [Sat, 13 May 2017 10:12:29 +0000 (13:12 +0300)]
rustc: rename closure_type to fn_sig.

7 years agoAuto merge of #42922 - frewsxcv:rollup, r=frewsxcv
bors [Tue, 27 Jun 2017 05:12:07 +0000 (05:12 +0000)]
Auto merge of #42922 - frewsxcv:rollup, r=frewsxcv

Rollup of 5 pull requests

- Successful merges: #42519, #42871, #42874, #42905, #42917
- Failed merges:

7 years agoRollup merge of #42917 - kennytm:gdb-fatal-proc-rec, r=Mark-Simulacrum
Corey Farwell [Tue, 27 Jun 2017 03:34:13 +0000 (23:34 -0400)]
Rollup merge of #42917 - kennytm:gdb-fatal-proc-rec, r=Mark-Simulacrum

compiletest: show details why GDB failed to execute.

Help finding reasons of spurious errors due to GDB failing to run (#42693).

7 years agoRollup merge of #42905 - casey:casey-utf8-null-doc, r=steveklabnik
Corey Farwell [Tue, 27 Jun 2017 03:34:12 +0000 (23:34 -0400)]
Rollup merge of #42905 - casey:casey-utf8-null-doc, r=steveklabnik

Reword OsStr docs to clarify that utf8 may contain nulls

The use of the word "but" in the OsStr docs implies (at least to me) that valid UTF-8 does not contain null bytes.

Using "which" instead makes it clear that valid UTF-8 may contain null bytes.

7 years agoRollup merge of #42874 - zackmdavis:overzealous_by_outer_forbid, r=nikomatsakis
Corey Farwell [Tue, 27 Jun 2017 03:34:11 +0000 (23:34 -0400)]
Rollup merge of #42874 - zackmdavis:overzealous_by_outer_forbid, r=nikomatsakis

only set "overruled by outer forbid" once for lint groups, by group name

Previously, conflicting forbid/allow attributes for a lint group would
result in a separate "allow(L) overruled by outer forbid(L)" error for
every lint L in the group. This was needlessly and annoyingly verbose;
we prefer to just have one error pointing out the conflicting
attributes.

(Also, while we're touching context.rs, clean up some unused arguments.)

Resolves #42873.

7 years agoRollup merge of #42871 - llogiq:for_lowering_vs_clippy, r=arielb1
Corey Farwell [Tue, 27 Jun 2017 03:34:10 +0000 (23:34 -0400)]
Rollup merge of #42871 - llogiq:for_lowering_vs_clippy, r=arielb1

change binding name of for loop lowering to appease clippy

With the latest change to for loop lowering (#42634), a `_next` binding was introduced.
Unfortunately, this [disturbs](https://github.com/Manishearth/rust-clippy/issues/1846) clippy's `used_underscore_binding` lint. This commit just renames the binding to `__next` so clippy will be happy. It should have no other effect.

7 years agoRollup merge of #42519 - GuillaumeGomez:create-more-error-codes, r=QuietMisdreavus
Corey Farwell [Tue, 27 Jun 2017 03:34:09 +0000 (23:34 -0400)]
Rollup merge of #42519 - GuillaumeGomez:create-more-error-codes, r=QuietMisdreavus

Create more error codes

Fixes #31174.
Part of #42229.

cc @Susurrus

7 years ago[libcore/cmp] Expand Ord/PartialOrd Derivable doc for enum types
Behnam Esfahbod [Tue, 27 Jun 2017 00:27:01 +0000 (18:27 -0600)]
[libcore/cmp] Expand Ord/PartialOrd Derivable doc for enum types

Expand Derivable docblock section for `Ord` and `PartialOrd` to cover
`enum` types, in addition to the existing language explaining it for
`struct` types.

7 years agomake lint on-by-default/implied-by messages appear only once
Zack M. Davis [Mon, 26 Jun 2017 20:30:21 +0000 (13:30 -0700)]
make lint on-by-default/implied-by messages appear only once

From review discussion on #38103
(https://github.com/rust-lang/rust/pull/38103#discussion_r94845060).

7 years agoAuto merge of #42916 - Mark-Simulacrum:update-cargo, r=alexcrichton
bors [Mon, 26 Jun 2017 22:42:08 +0000 (22:42 +0000)]
Auto merge of #42916 - Mark-Simulacrum:update-cargo, r=alexcrichton

Update Cargo

Haven't run extensive tests locally (not really sure what to test) but this primarily pulls in minor changes: https://github.com/rust-lang/cargo/pull/4215, https://github.com/rust-lang/cargo/pull/4209, and https://github.com/rust-lang/cargo/pull/4218. The last one fixes the flaky cargo test by ignoring it, which should unblock https://github.com/rust-lang/rust/pull/42745 -- that's beta nominated.

r? @alexcrichton

7 years agocompiletest: show details if GDB failed to execute.
kennytm [Mon, 26 Jun 2017 18:44:42 +0000 (02:44 +0800)]
compiletest: show details if GDB failed to execute.

7 years agoUpdate Cargo
Mark Simulacrum [Mon, 26 Jun 2017 16:26:15 +0000 (10:26 -0600)]
Update Cargo

7 years agoAuto merge of #42885 - ollie27:rustdoc_empty_glob_path, r=GuillaumeGomez
bors [Mon, 26 Jun 2017 11:06:13 +0000 (11:06 +0000)]
Auto merge of #42885 - ollie27:rustdoc_empty_glob_path, r=GuillaumeGomez

rustdoc: Don't ICE on `use *;`

Fixes #42875

7 years agoReword OsStr docs to clarify that utf8 may contain nulls
Casey Rodarmor [Sun, 25 Jun 2017 21:23:43 +0000 (14:23 -0700)]
Reword OsStr docs to clarify that utf8 may contain nulls

7 years agostd: Fix implementation of `Alloc::alloc_one`
Alex Crichton [Sun, 25 Jun 2017 18:33:47 +0000 (11:33 -0700)]
std: Fix implementation of `Alloc::alloc_one`

This had an accidental `u8 as *mut T` where it was intended to have just a
normal pointer-to-pointer cast.

Closes #42827

7 years agoStop disabling fill in jemalloc
Steven Fackler [Sun, 25 Jun 2017 17:58:12 +0000 (10:58 -0700)]
Stop disabling fill in jemalloc

The underlying bug has been fixed for over 2 years!

7 years agoAuto merge of #42865 - ollie27:rustdoc_assoc_consts, r=GuillaumeGomez
bors [Sun, 25 Jun 2017 17:39:26 +0000 (17:39 +0000)]
Auto merge of #42865 - ollie27:rustdoc_assoc_consts, r=GuillaumeGomez

rustdoc: Fix a few issues with associated consts

* Make sure private consts are stripped.
* Don't show a code block for the value if there is none.
* Make sure default values are shown in impls.
* Make sure docs from the trait are used if the impl has no docs.

7 years agoonly show allowed failure count if there are allowed failures
Paul Woolcock [Sun, 25 Jun 2017 00:37:15 +0000 (20:37 -0400)]
only show allowed failure count if there are allowed failures

7 years agoAdd reference link
Guillaume Gomez [Sun, 25 Jun 2017 07:25:37 +0000 (09:25 +0200)]
Add reference link

7 years agoDon't naively point to return type on type error
Esteban Küber [Sun, 25 Jun 2017 02:28:43 +0000 (19:28 -0700)]
Don't naively point to return type on type error

7 years agoStabilize RangeArgument
Steven Fackler [Mon, 19 Jun 2017 05:01:29 +0000 (22:01 -0700)]
Stabilize RangeArgument

Move it and Bound to core::ops while we're at it.

Closes #30877

7 years agoStabilize ThreadId
Steven Fackler [Thu, 8 Jun 2017 15:41:23 +0000 (11:41 -0400)]
Stabilize ThreadId

Closes #21507

7 years agoStabilize OsString::shrink_to_fit
Steven Fackler [Thu, 8 Jun 2017 15:35:46 +0000 (11:35 -0400)]
Stabilize OsString::shrink_to_fit

Closes #40421

7 years agoStabilize cmp::Reverse
Steven Fackler [Thu, 8 Jun 2017 15:34:22 +0000 (11:34 -0400)]
Stabilize cmp::Reverse

Closes #40893

7 years agoStabilize Command::envs
Steven Fackler [Thu, 8 Jun 2017 15:31:25 +0000 (11:31 -0400)]
Stabilize Command::envs

Closes #38526

7 years agoAdd compile-fail test for the new feature gate
Paul Woolcock [Fri, 23 Jun 2017 15:01:41 +0000 (11:01 -0400)]
Add compile-fail test for the new feature gate

7 years agoAuto merge of #42784 - tlively:wasm-bot, r=alexcrichton
bors [Sat, 24 Jun 2017 22:34:08 +0000 (22:34 +0000)]
Auto merge of #42784 - tlively:wasm-bot, r=alexcrichton

Make wasm32 buildbot test LLVM backend

This adds the experimental targets option to configure so it can be used
by the builders and changes the wasm32 Dockerfile accordingly. Instead
of using LLVM from the emsdk, the builder's emscripten tools now uses
the Rust in-tree LLVM, since this is the one built with wasm support.

7 years agoUse new macro instead
Guillaume Gomez [Mon, 12 Jun 2017 16:58:11 +0000 (18:58 +0200)]
Use new macro instead

7 years agowording improvement
Guillaume Gomez [Fri, 9 Jun 2017 20:04:29 +0000 (22:04 +0200)]
wording improvement

7 years agoAdd E0607
Guillaume Gomez [Wed, 7 Jun 2017 22:13:28 +0000 (00:13 +0200)]
Add E0607

7 years agoAdd E0606
Guillaume Gomez [Wed, 7 Jun 2017 21:54:51 +0000 (23:54 +0200)]
Add E0606

7 years agoAdd E0605
Guillaume Gomez [Wed, 7 Jun 2017 20:24:15 +0000 (22:24 +0200)]
Add E0605

7 years agoAdd E0604
Guillaume Gomez [Wed, 7 Jun 2017 18:58:09 +0000 (20:58 +0200)]
Add E0604

7 years agoDo not specify return type in suggestion for some `Ty`s
Esteban Küber [Sat, 24 Jun 2017 19:16:20 +0000 (12:16 -0700)]
Do not specify return type in suggestion for some `Ty`s

Don't specify a suggested return type for `TyAnon`, `TyFnDef`,
`TyFnPtr`, `TyDynamic`, `TyClosure` and `TyProjection`.

7 years agoRestore old emscripten.sh for use by asmjs
Thomas Lively [Sat, 24 Jun 2017 18:35:48 +0000 (11:35 -0700)]
Restore old emscripten.sh for use by asmjs

7 years agorustdoc: Don't ICE on `use *;`
Oliver Middleton [Sat, 24 Jun 2017 17:16:39 +0000 (18:16 +0100)]
rustdoc: Don't ICE on `use *;`

7 years agoSuggest removal of semicolon (instead of being help)
Esteban Küber [Sat, 24 Jun 2017 08:09:57 +0000 (01:09 -0700)]
Suggest removal of semicolon (instead of being help)

7 years agoAdd a feature gate for the `#[allow_fail]` attribute
Paul Woolcock [Fri, 23 Jun 2017 13:43:28 +0000 (09:43 -0400)]
Add a feature gate for the `#[allow_fail]` attribute

7 years agoMove global vars changing tests into run-pass
Stepan Koltsov [Sat, 24 Jun 2017 15:23:39 +0000 (18:23 +0300)]
Move global vars changing tests into run-pass

Should fix race #42795

7 years agoAuto merge of #42864 - slo1:attempt, r=Mark-Simulacrum
bors [Sat, 24 Jun 2017 14:43:01 +0000 (14:43 +0000)]
Auto merge of #42864 - slo1:attempt, r=Mark-Simulacrum

Saves created temp directory if save-temps option is used.

Should fix #38068.

7 years agoAuto merge of #42541 - gilescope:patch-1, r=alexcrichton
bors [Sat, 24 Jun 2017 12:18:40 +0000 (12:18 +0000)]
Auto merge of #42541 - gilescope:patch-1, r=alexcrichton

assert_eq failure message easier to read

By having the left and right strings aligned with one another it helps spot the difference between the two far quicker than if they are on the same line.

E.g.
Before:

```
thread 'tests::test_safe_filename' panicked at 'assertion failed: `(left == right)` left:  `"-aandb--S123.html"` right: `"-aandb-S123.html"`',
```

After:

```
thread 'tests::test_safe_filename' panicked at 'assertion failed: `(left == right)`
left:  `"-aandb--S123.html"`
right: `"-aandb-S123.html"`',
```

When the strings are both on the same line it take a lot longer to spot the difference. It is a small change but the small time savings add up with repetition. This would help Rust be an excellent language to write tests in out of the box.

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

7 years agofix some tests i missed
Paul Woolcock [Thu, 25 May 2017 20:17:29 +0000 (16:17 -0400)]
fix some tests i missed

7 years agoShorten some lines so this can pass the tidy checks
Paul Woolcock [Thu, 25 May 2017 15:36:18 +0000 (11:36 -0400)]
Shorten some lines so this can pass the tidy checks