]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoUpdate compiler-builtins and use it the 128-bit lowering MIR test
Scott McMurray [Sat, 25 Nov 2017 15:20:33 +0000 (07:20 -0800)]
Update compiler-builtins and use it the 128-bit lowering MIR test

6 years agoAuto merge of #46430 - kennytm:rollup, r=kennytm
bors [Fri, 1 Dec 2017 21:29:27 +0000 (21:29 +0000)]
Auto merge of #46430 - kennytm:rollup, r=kennytm

Rollup of 13 pull requests

- Successful merges: #45880, #46280, #46373, #46376, #46385, #46386, #46387, #46392, #46400, #46401, #46405, #46412, #46421
- Failed merges:

6 years agoAuto merge of #46425 - eddyb:mir-place, r=nikomatsakis
bors [Fri, 1 Dec 2017 18:48:20 +0000 (18:48 +0000)]
Auto merge of #46425 - eddyb:mir-place, r=nikomatsakis

MIR: change "lvalue" terminology to "place".

As pointed out elsewhere, "lvalue" vs "rvalue" is a misleading/obscure distinction and several other choices have been proposed, the one I prefer being "place" vs "value".

This PR only touches the "lvalue" side, and only in MIR-related code, as it's already a lot and could rot.

6 years agoRollup merge of #46421 - mnd:fix-build-for-guix, r=alexcrichton
kennytm [Fri, 1 Dec 2017 17:39:04 +0000 (01:39 +0800)]
Rollup merge of #46421 - mnd:fix-build-for-guix, r=alexcrichton

build_helper: destination file can't be up to date when not exists

Function "up_to_date" return incorrect result if mtime for all fetched sources is set to epoch time. Add existence check to function.

This fix required for a [Guix](https://www.gnu.org/software/guix/) package because a Nix builder set mtime of all sources to epoch time.

6 years agoRollup merge of #46412 - chrisduerr:issue-46380, r=QuietMisdreavus
kennytm [Fri, 1 Dec 2017 17:39:03 +0000 (01:39 +0800)]
Rollup merge of #46412 - chrisduerr:issue-46380, r=QuietMisdreavus

Hide private trait type params and show hidden items with document-private

As discussed in #46380, this PR removes the `strip-hidden` pass from `--document-private-items` which allows showing `#[doc(hidden)]` with rustdoc.

The second commit removes the trait implementation from the docs if the trait's parameter is private.

6 years agoRollup merge of #46405 - alexcrichton:fix-rustdoc, r=estebank
kennytm [Fri, 1 Dec 2017 17:39:02 +0000 (01:39 +0800)]
Rollup merge of #46405 - alexcrichton:fix-rustdoc, r=estebank

rustc: Filter out bogus extern crate warnings

Rustdoc has for some time now used the "everybody loops" pass in the compiler to
avoid typechecking and otherwise avoid looking at implementation details.
In #46115 the placement of this pass was pushed back in the compiler to after
macro expansion to ensure that it works with macro-expanded code as well. This
in turn caused the regression in #46271.

The bug here was that the resolver was producing `def_id` instances for
"possibly unused extern crates" which would then later get processed during
typeck to actually issue lint warnings. The problem was that *after* resolution
these `def_id` nodes were actually removed from the AST by the "everybody loops"
pass. This later, when we tried to take a look at `def_id`, caused the compiler
to panic.

The fix applied here is a bit of a heavy hammer which is to just, in this one
case, ignore the `extern crate` lints if the `def_id` looks "bogus" in any way
(basically if it looks like the node was removed after resolution). The real
underlying bug here is probably that the "everybody loops" AST pass is being
stressed to much beyond what it was originally intended to do, but this should
at least fix the ICE for now...

Closes #46271

6 years agoRollup merge of #46401 - alexcrichton:wasm-tests, r=arielb1
kennytm [Fri, 1 Dec 2017 17:39:01 +0000 (01:39 +0800)]
Rollup merge of #46401 - alexcrichton:wasm-tests, r=arielb1

wasm: Update LLVM to fix a test

This commit updates LLVM with some tweaks to the integer <-> floating point
conversion instructions to ensure that `as` in Rust doesn't trap.

Closes #46298

6 years agoRollup merge of #46400 - michaelwoerister:vtable-encodable, r=eddyb
kennytm [Fri, 1 Dec 2017 17:39:00 +0000 (01:39 +0800)]
Rollup merge of #46400 - michaelwoerister:vtable-encodable, r=eddyb

incr.comp.: Make traits::VTable encodable and decodable.

Make vtables encodable so we can cache the `trans_fulfill_obligation` query at some point.

r? @eddyb

6 years agoRollup merge of #46392 - GuillaumeGomez:fix-tooltip, r=QuietMisdreavus
kennytm [Fri, 1 Dec 2017 17:38:59 +0000 (01:38 +0800)]
Rollup merge of #46392 - GuillaumeGomez:fix-tooltip, r=QuietMisdreavus

Invert colors in important traits tooltip

Part of #46352.

r? @QuietMisdreavus

6 years agoRollup merge of #46387 - chrisduerr:master, r=QuietMisdreavus
kennytm [Fri, 1 Dec 2017 17:38:58 +0000 (01:38 +0800)]
Rollup merge of #46387 - chrisduerr:master, r=QuietMisdreavus

Fix rustdoc item summaries that are headers

Rustoc item summaries that are headers were not displayed at all because
they started with whitespace.

This PR fixes this and now removes the whitespace and then displays the
block.

I'm not sure if the rustdoc test is written correctly, if there's anything to improve, just let me know. :)

This fixes #46377.

This is how it looks when rendered out now:
![Rendered](https://i.imgur.com/7u8jUAM.png)

6 years agoRollup merge of #46386 - Aaron1011:fix_rustdoc_log, r=Mark-Simulacrum
kennytm [Fri, 1 Dec 2017 17:38:57 +0000 (01:38 +0800)]
Rollup merge of #46386 - Aaron1011:fix_rustdoc_log, r=Mark-Simulacrum

Remove librustdoc dependency on env_logger

We want librustdoc to pickup the env_logger dependency from
the sysroot. This ensures that the same copy of env_logger is used
for both internal crates (e.g. librustc_driver, libsyntax) and
librustdoc

Closes #46383

6 years agoRollup merge of #46385 - alexcrichton:fix-cargo-book, r=Mark-Simulacrum
kennytm [Fri, 1 Dec 2017 17:38:56 +0000 (01:38 +0800)]
Rollup merge of #46385 - alexcrichton:fix-cargo-book, r=Mark-Simulacrum

rustbuild: Fix a typo with the Cargo book

The usage of `Path::new` prevented out-of-tree builds (like the bots do) from
working by accident!

Closes #46195

6 years agoRollup merge of #46376 - SimonSapin:cargoup, r=kennytm
kennytm [Fri, 1 Dec 2017 17:38:55 +0000 (01:38 +0800)]
Rollup merge of #46376 - SimonSapin:cargoup, r=kennytm

Update Cargo to Wed Nov 29 15:19:05 2017 +0000

https://github.com/rust-lang/cargo/commit/5bb478a518bcf75537409e8b71f6b7cc4af362df

Pick up `workspace.default-members` support: https://github.com/rust-lang/cargo/pull/4743

6 years agoRollup merge of #46373 - jakllsch:netbsd-kern_proc_pathname, r=kennytm
kennytm [Fri, 1 Dec 2017 17:38:54 +0000 (01:38 +0800)]
Rollup merge of #46373 - jakllsch:netbsd-kern_proc_pathname, r=kennytm

NetBSD: add sysctl backend for std::env::current_exe

Use the CTL_KERN.KERN_PROC_ARGS.-1.KERN_PROC_PATHNAME sysctl in
preference over the /proc/curproc/exe symlink.

Additionally, perform more validation of aformentioned symlink.
Particularly on pre-8.x NetBSD this symlink will point to '/' when
accurate information is unavailable.

6 years agoRollup merge of #46280 - tamird:remove-old-refs, r=alexcrichton
kennytm [Fri, 1 Dec 2017 17:38:53 +0000 (01:38 +0800)]
Rollup merge of #46280 - tamird:remove-old-refs, r=alexcrichton

rustc_llvm: remove stale references

...that were removed in 77c3bfa7429abf87b76ba84108df018d9e9d90e2.

r? @alexcrichton

6 years agoRollup merge of #45880 - arielb1:never-coerce, r=nikomatsakis
kennytm [Fri, 1 Dec 2017 17:38:52 +0000 (01:38 +0800)]
Rollup merge of #45880 - arielb1:never-coerce, r=nikomatsakis

make coercions to `!` in unreachable code a hard error

This was added to cover up a lazy extra semicolon in #35849, but does
not actually make sense. This is removed as a part of the stabilization
of `never_type`.

6 years agoMIR: s/lv(al(ue)?)?/place in function/variable/module names.
Eduard-Mihai Burtescu [Fri, 1 Dec 2017 12:39:51 +0000 (14:39 +0200)]
MIR: s/lv(al(ue)?)?/place in function/variable/module names.

6 years agoMIR: s/Lvalue/Place in type names.
Eduard-Mihai Burtescu [Fri, 1 Dec 2017 12:31:47 +0000 (14:31 +0200)]
MIR: s/Lvalue/Place in type names.

6 years agoAuto merge of #46338 - michaelwoerister:lazy-diagnostics, r=nikomatsakis
bors [Fri, 1 Dec 2017 16:01:22 +0000 (16:01 +0000)]
Auto merge of #46338 - michaelwoerister:lazy-diagnostics, r=nikomatsakis

incr.comp.: Load cached diagnostics lazily and allow more things in the cache.

This PR implements makes two changes:
1. Diagnostics are loaded lazily from the incr. comp. cache now. This turned out to be necessary for correctness because diagnostics contain `Span` values and deserializing those requires that the source file they point to is still around in the current compilation session. Obviously this isn't always the case. Loading them lazily allows for never touching diagnostics that are not valid anymore.
2. The compiler can now deal with there being no cache entry for a given query invocation. Before, all query results of a cacheable query were always expected to be present in the cache. Now, the compiler can fall back to re-computing the result if there is no cache entry found. This allows for caching things that we cannot force from dep-node (like the `symbol_name` query). In such a case we'll just have a "best effort" caching strategy.

~~This PR is based on https://github.com/rust-lang/rust/pull/46301 (=first 2 commits), so please don't merge until that has landed. The rest of the commits are ready for review though.~~

r? @nikomatsakis

6 years agoincr.comp.: Fix merge fallout.
Michael Woerister [Fri, 1 Dec 2017 13:29:20 +0000 (14:29 +0100)]
incr.comp.: Fix merge fallout.

6 years agoAuto merge of #46236 - davidtwco:issue-46023, r=arielb1
bors [Fri, 1 Dec 2017 13:26:10 +0000 (13:26 +0000)]
Auto merge of #46236 - davidtwco:issue-46023, r=arielb1

MIR-borrowck: immutable unique closure upvars can be mutated

Fixes #46023 and #46160 (see [this comment](https://github.com/rust-lang/rust/pull/46236#issuecomment-347204874)).

6 years agoincr.comp.: Use the awesome new '_ in a few places.
Michael Woerister [Wed, 29 Nov 2017 11:42:59 +0000 (12:42 +0100)]
incr.comp.: Use the awesome new '_ in a few places.

6 years agoincr.comp.: Allow for recovering from missing on-disk cache entries.
Michael Woerister [Tue, 28 Nov 2017 16:32:28 +0000 (17:32 +0100)]
incr.comp.: Allow for recovering from missing on-disk cache entries.

6 years agoincr.comp.: Load diagnostics from previous session lazily and clean up on-disk-cache...
Michael Woerister [Tue, 28 Nov 2017 15:58:02 +0000 (16:58 +0100)]
incr.comp.: Load diagnostics from previous session lazily and clean up on-disk-cache persistence code.

6 years agoincr.comp.: Add a newtype for byte positions within the incr. comp. cache.
Michael Woerister [Tue, 28 Nov 2017 13:19:44 +0000 (14:19 +0100)]
incr.comp.: Add a newtype for byte positions within the incr. comp. cache.

6 years agoincr.comp.: Store Spans as (file,line,col,length) in incr.comp. cache.
Michael Woerister [Fri, 24 Nov 2017 13:00:33 +0000 (14:00 +0100)]
incr.comp.: Store Spans as (file,line,col,length) in incr.comp. cache.

The previous method ran into problems because ICH would treat Spans
as (file,line,col) but the cache contained byte offsets and its
possible for the latter to change while the former stayed stable.

6 years agoincr.comp.: Properly hash and encode macro expansion information.
Michael Woerister [Wed, 22 Nov 2017 12:41:27 +0000 (13:41 +0100)]
incr.comp.: Properly hash and encode macro expansion information.

6 years agobuild_helper: destination file can't be up to date when not exists
Nikolay Merinov [Fri, 1 Dec 2017 09:28:14 +0000 (14:28 +0500)]
build_helper: destination file can't be up to date when not exists

Function "up_to_date" return incorrect result if mtime for all fetched
sources is set to epoch time. Add existence check to function.

6 years agoAuto merge of #46211 - snipsco:master, r=pnkfelix
bors [Fri, 1 Dec 2017 08:44:42 +0000 (08:44 +0000)]
Auto merge of #46211 - snipsco:master, r=pnkfelix

disable jemalloc on executables for ios targets

This is a (temporary ?) workaround for issue #45262

6 years agoAuto merge of #45997 - estebank:pub-ident, r=nikomatsakis
bors [Fri, 1 Dec 2017 06:06:06 +0000 (06:06 +0000)]
Auto merge of #45997 - estebank:pub-ident, r=nikomatsakis

Account for missing keyword in fn/struct definition

Fix #38911.

6 years agoAuto merge of #45846 - pietroalbini:use-nested-groups, r=petrochenkov
bors [Fri, 1 Dec 2017 03:25:54 +0000 (03:25 +0000)]
Auto merge of #45846 - pietroalbini:use-nested-groups, r=petrochenkov

Add nested groups in imports

This PR adds support for nested groups in imports (rust-lang/rfcs#2128, tracking issue #44494).

r? @petrochenkov

6 years agoAuto merge of #46370 - michaelwoerister:rm-metadata-hashing, r=eddyb
bors [Fri, 1 Dec 2017 00:46:08 +0000 (00:46 +0000)]
Auto merge of #46370 - michaelwoerister:rm-metadata-hashing, r=eddyb

incr.comp.: Remove ability to produce incr. comp. hashes during metadata export.

This functionality has been superseded by on-import hashing, which can be less conservative and does not require extra infrastructure.

r? @nikomatsakis

6 years agoFixed spurious cannot borrow immutable item error with a closure.
David Wood [Thu, 30 Nov 2017 23:19:06 +0000 (23:19 +0000)]
Fixed spurious cannot borrow immutable item error with a closure.

6 years agoImmutable unique closure upvars cannot be mutated.
David Wood [Thu, 30 Nov 2017 23:18:38 +0000 (23:18 +0000)]
Immutable unique closure upvars cannot be mutated.

6 years agoAdded test for spurious cannot borrow immutable item error with a closure
David Wood [Thu, 30 Nov 2017 23:16:17 +0000 (23:16 +0000)]
Added test for spurious cannot borrow immutable item error with a closure

6 years agoAdded test for immutable unique closure upvar mutation.
David Wood [Thu, 30 Nov 2017 23:15:10 +0000 (23:15 +0000)]
Added test for immutable unique closure upvar mutation.

6 years agoexplanatory note for the workaround
Mathieu Poumeyrol [Thu, 30 Nov 2017 22:14:29 +0000 (23:14 +0100)]
explanatory note for the workaround

6 years agoFix htmldocck naming
Christian Duerr [Thu, 30 Nov 2017 20:43:21 +0000 (21:43 +0100)]
Fix htmldocck naming

After renaming the structs and enums the htmldocck strings still
contained the old names. This lead to test failure.

These htmldocck tests have been updated to use the proper names of the
rust structs and traits.

6 years agoHide trait impl with private trait type parameter
Christian Duerr [Thu, 30 Nov 2017 20:18:36 +0000 (21:18 +0100)]
Hide trait impl with private trait type parameter

Trait's implementations with private type parameters were displayed in
the implementing struct's documentation until now.

With this change any trait implementation that uses a private type
parameter is now hidden in the docs.

6 years agoShow hidden items with rustdoc's document-private
Christian Duerr [Thu, 30 Nov 2017 20:18:00 +0000 (21:18 +0100)]
Show hidden items with rustdoc's document-private

When using `#[doc(hidden)]` elements are hidden from docs even when the
rustdoc flag `--document-private-items` is set.

This behavior has been changed to display all hidden items when the flag
is active.

6 years agoAuto merge of #46402 - oli-obk:clippy, r=kennytm
bors [Thu, 30 Nov 2017 19:18:14 +0000 (19:18 +0000)]
Auto merge of #46402 - oli-obk:clippy, r=kennytm

Reenable clippy

6 years agoNetBSD: add sysctl backend for std::env::current_exe
Jonathan A. Kollasch [Wed, 29 Nov 2017 17:31:09 +0000 (11:31 -0600)]
NetBSD: add sysctl backend for std::env::current_exe

Use the CTL_KERN.KERN_PROC_ARGS.-1.KERN_PROC_PATHNAME sysctl in
preference over the /proc/curproc/exe symlink.

Additionally, perform more validation of aformentioned symlink.
Particularly on pre-8.x NetBSD this symlink will point to '/' when
accurate information is unavailable.

6 years agorustc: Filter out bogus extern crate warnings
Alex Crichton [Thu, 30 Nov 2017 15:59:35 +0000 (07:59 -0800)]
rustc: Filter out bogus extern crate warnings

Rustdoc has for some time now used the "everybody loops" pass in the compiler to
avoid typechecking and otherwise avoid looking at implementation details.
In #46115 the placement of this pass was pushed back in the compiler to after
macro expansion to ensure that it works with macro-expanded code as well. This
in turn caused the regression in #46271.

The bug here was that the resolver was producing `def_id` instances for
"possibly unused extern crates" which would then later get processed during
typeck to actually issue lint warnings. The problem was that *after* resolution
these `def_id` nodes were actually removed from the AST by the "everybody loops"
pass. This later, when we tried to take a look at `def_id`, caused the compiler
to panic.

The fix applied here is a bit of a heavy hammer which is to just, in this one
case, ignore the `extern crate` lints if the `def_id` looks "bogus" in any way
(basically if it looks like the node was removed after resolution). The real
underlying bug here is probably that the "everybody loops" AST pass is being
stressed to much beyond what it was originally intended to do, but this should
at least fix the ICE for now...

Closes #46271

6 years agoReenable clippy
Oliver Schneider [Thu, 30 Nov 2017 14:20:40 +0000 (15:20 +0100)]
Reenable clippy

6 years agoincr.comp.: Make traits::VTable encodable and decodable.
Michael Woerister [Thu, 30 Nov 2017 13:34:09 +0000 (14:34 +0100)]
incr.comp.: Make traits::VTable encodable and decodable.

6 years agowasm: Update LLVM to fix a test
Alex Crichton [Wed, 29 Nov 2017 00:07:12 +0000 (16:07 -0800)]
wasm: Update LLVM to fix a test

This commit updates LLVM with some tweaks to the integer <-> floating point
conversion instructions to ensure that `as` in Rust doesn't trap.

Closes #46298

6 years agomake coercions to `!` in unreachable code a hard error
Ariel Ben-Yehuda [Wed, 8 Nov 2017 22:46:15 +0000 (00:46 +0200)]
make coercions to `!` in unreachable code a hard error

This was added to cover up a lazy extra semicolon in #35849, but does
not actually make sense. This is removed as a part of the stabilization
of `never_type`.

6 years agoMark rustfmt and rls as broken
Pietro Albini [Thu, 30 Nov 2017 12:18:18 +0000 (13:18 +0100)]
Mark rustfmt and rls as broken

6 years agoImplement RFC 2128 (use_nested_groups)
Pietro Albini [Tue, 26 Sep 2017 21:04:00 +0000 (23:04 +0200)]
Implement RFC 2128 (use_nested_groups)

This commit adds support for nested groups inside `use` declarations,
such as `use foo::{bar, sub::{baz::Foo, *}};`.

6 years agoAuto merge of #46299 - michaelwoerister:incr-comp-krimskrams, r=nikomatsakis
bors [Thu, 30 Nov 2017 10:57:21 +0000 (10:57 +0000)]
Auto merge of #46299 - michaelwoerister:incr-comp-krimskrams, r=nikomatsakis

incr.comp.: Some preparatory work for caching more query results.

This PR
* adds and updates some encoding/decoding routines for various query result types so they can be cached later, and
* adds missing `[input]` annotations for a few `DepNode` variants.

The situation around having to explicitly mark dep-nodes/queries as inputs is not really satisfactory. I hope we can find a way of making this more fool-proof in the future.

r? @nikomatsakis

6 years agoUpdate Cargo to Wed Nov 29 15:19:05 2017 +0000
Simon Sapin [Wed, 29 Nov 2017 18:51:16 +0000 (19:51 +0100)]
Update Cargo to Wed Nov 29 15:19:05 2017 +0000

https://github.com/rust-lang/cargo/commit/5bb478a518bcf75537409e8b71f6b7cc4af362df

Pick up `workspace.default-members` support:
https://github.com/rust-lang/cargo/pull/4743

6 years agoAuto merge of #46226 - arielb1:special-region-obligation, r=nikomatsakis
bors [Thu, 30 Nov 2017 08:00:27 +0000 (08:00 +0000)]
Auto merge of #46226 - arielb1:special-region-obligation, r=nikomatsakis

avoid type-live-for-region obligations on dummy nodes

Type-live-for-region obligations on DUMMY_NODE_ID cause an ICE, and it
turns out that in the few cases they are needed, these obligations are not
needed anyway because they are verified elsewhere.

Fixes #46069.

Beta-nominating because this is a regression for our new beta.
r? @nikomatsakis

6 years agoAuto merge of #46041 - zilbuz:issue-44837, r=arielb1
bors [Thu, 30 Nov 2017 05:26:28 +0000 (05:26 +0000)]
Auto merge of #46041 - zilbuz:issue-44837, r=arielb1

MIR borrowck: finalize `check_access_permissions()`

Fix #44837 (hopefully for good)

r? @arielb1

6 years agoAuto merge of #46366 - kennytm:revert-46360, r=kennytm
bors [Thu, 30 Nov 2017 01:28:44 +0000 (01:28 +0000)]
Auto merge of #46366 - kennytm:revert-46360, r=kennytm

Revert #46360, re-enable macOS dist images.

This PR reverts #46360, which disabled all macOS dist images to workaround travis-ci/travis-ci#8821.

This PR should be merged as soon as the Travis bug has been fixed.

Closes #46357.

cc @rust-lang/infra

6 years agoFix rustoc item summaries that are headers
Christian Duerr [Wed, 29 Nov 2017 23:28:59 +0000 (00:28 +0100)]
Fix rustoc item summaries that are headers

Rustoc item summaries that are headers were not displayed at all because
they started with whitespace.

This PR fixes this and now removes the whitespace and then displays the
block.

6 years agoRemove librustdoc dependency on env_logger
Aaron Hill [Wed, 29 Nov 2017 23:10:42 +0000 (18:10 -0500)]
Remove librustdoc dependency on env_logger

We want librustdoc to pickup the env_logger dependency from
the sysroot. This ensures that the same copy of env_logger is used
for both internal crates (e.g. librustc_driver, libsyntax) and
librustdoc

Closes #46383

6 years agorustbuild: Fix a typo with the Cargo book
Alex Crichton [Wed, 29 Nov 2017 23:00:52 +0000 (15:00 -0800)]
rustbuild: Fix a typo with the Cargo book

The usage of `Path::new` prevented out-of-tree builds (like the bots do) from
working by accident!

Closes #46195

6 years agoAuto merge of #46144 - nrc:rls-update, r=alexcrichton
bors [Wed, 29 Nov 2017 22:41:05 +0000 (22:41 +0000)]
Auto merge of #46144 - nrc:rls-update, r=alexcrichton

Update RLS and Rustfmt

r? @alexcrichton

6 years agoInvert colors in important traits tooltip
Guillaume Gomez [Wed, 29 Nov 2017 18:23:41 +0000 (19:23 +0100)]
Invert colors in important traits tooltip

6 years agoincr.comp.: Update test cases after metadata hashing removal.
Michael Woerister [Wed, 29 Nov 2017 15:29:13 +0000 (16:29 +0100)]
incr.comp.: Update test cases after metadata hashing removal.

6 years agoincr.comp.: Remove on-export crate metadata hashing.
Michael Woerister [Wed, 29 Nov 2017 15:28:25 +0000 (16:28 +0100)]
incr.comp.: Remove on-export crate metadata hashing.

6 years agoRevert "Auto merge of #46360 - kennytm:workaround-travis-8821, r=kennytm"
kennytm [Wed, 29 Nov 2017 13:03:53 +0000 (21:03 +0800)]
Revert "Auto merge of #46360 - kennytm:workaround-travis-8821, r=kennytm"

This reverts commit dc0e227745765c198958f0298785d18bcf61d4ae, reversing
changes made to 77ab3a1d5ff69c0cb3eb85a75ef734eaf7429f1b.

[skip ci]

6 years agoAuto merge of #46362 - kennytm:rollup, r=kennytm
bors [Wed, 29 Nov 2017 12:17:45 +0000 (12:17 +0000)]
Auto merge of #46362 - kennytm:rollup, r=kennytm

Rollup of 10 pull requests

- Successful merges: #45969, #46077, #46219, #46287, #46293, #46322, #46323, #46330, #46354, #46356
- Failed merges:

6 years agoRollup merge of #46356 - daboross:patch-2, r=sfackler
kennytm [Wed, 29 Nov 2017 10:37:54 +0000 (18:37 +0800)]
Rollup merge of #46356 - daboross:patch-2, r=sfackler

Reject '2' as a binary digit in internals of b: number formatting

The `radix!` macro generates an implementation of the private trait `GenericRadix`, and the code replaced changes Binary's implementation to no longer accept '2' as a valid digit to print.

Granted, this code is literally only ever called from another method in this private trait, and that method has logic to never hand a '2' to the printing function. Even given this, the code's there, I thought it would be best to fix this for clarity of anyone reading it.

6 years agoRollup merge of #46354 - Mark-Simulacrum:alt-try, r=alexcrichton
kennytm [Wed, 29 Nov 2017 10:37:53 +0000 (18:37 +0800)]
Rollup merge of #46354 - Mark-Simulacrum:alt-try, r=alexcrichton

Deploy builds both with asserts enabled and asserts disabled to CI.

This also removes uploads to the 'try' bucket, and instead dumps
everything into the two rustc-builds and rustc-builds-alt buckets. This
makes lives easier, as there is only one location for a given "type" of
build, and since we have the git commit hash in the filenames, this is
fine; we won't run into uploads of the same commit.

cc @aidanhs -- this will break crater's logic for downloading `try#xxx` commits since the try bucket won't be uploaded into

r? @alexcrichton

6 years agoRollup merge of #46330 - SimonSapin:patch-6, r=kennytm
kennytm [Wed, 29 Nov 2017 10:37:52 +0000 (18:37 +0800)]
Rollup merge of #46330 - SimonSapin:patch-6, r=kennytm

Update comment on alternate builds in .travis.yml

https://github.com/rust-lang/rust/pull/45810#issuecomment-347257640

6 years agoRollup merge of #46323 - ia0:fix_mpsc_error_conv, r=kennytm
kennytm [Wed, 29 Nov 2017 10:37:51 +0000 (18:37 +0800)]
Rollup merge of #46323 - ia0:fix_mpsc_error_conv, r=kennytm

Fix since for mpsc_error_conversions

This is a followup of #45506.

6 years agoRollup merge of #46322 - gnzlbg:mmx, r=alexcrichton
kennytm [Wed, 29 Nov 2017 10:37:50 +0000 (18:37 +0800)]
Rollup merge of #46322 - gnzlbg:mmx, r=alexcrichton

white list MMX and MSA target features

r? @alexcrichton

6 years agoRollup merge of #46293 - ollie27:atomic_bool_from, r=BurntSushi
kennytm [Wed, 29 Nov 2017 10:37:50 +0000 (18:37 +0800)]
Rollup merge of #46293 - ollie27:atomic_bool_from, r=BurntSushi

impl From<bool> for AtomicBool

This seems like an obvious omission from #45610. ~~I've used the same feature name and version in the hope that this can be backported to beta so it's stabilized with the other impls. If it can't be I'll change it to `1.24.0`.~~

6 years agoRollup merge of #46287 - SimonSapin:stable-constness, r=aturon
kennytm [Wed, 29 Nov 2017 10:37:47 +0000 (18:37 +0800)]
Rollup merge of #46287 - SimonSapin:stable-constness, r=aturon

Stabilize const-calling existing const-fns in std

Fixes #46038

6 years agoRollup merge of #46219 - rust-lang:frewsxcv-issue-45636, r=GuillaumeGomez
kennytm [Wed, 29 Nov 2017 10:37:45 +0000 (18:37 +0800)]
Rollup merge of #46219 - rust-lang:frewsxcv-issue-45636, r=GuillaumeGomez

Improve documentation for slice swap/copy/clone operations.

Fixes #45636.

- Demonstrate how to use these operations with slices of differing
  lengths
- Demonstrate how to swap/copy/clone sub-slices of a slice using
  `split_at_mut`

6 years agoRollup merge of #46077 - LukasKalbertodt:stabilize-ascii-ctype, r=alexcrichton
kennytm [Wed, 29 Nov 2017 10:37:44 +0000 (18:37 +0800)]
Rollup merge of #46077 - LukasKalbertodt:stabilize-ascii-ctype, r=alexcrichton

Stabilize some `ascii_ctype` methods

As discussed in #39658, this PR stabilizes those methods for `u8` and `char`. All inherent `ascii_ctype` for `[u8]` and `str` are removed as we prefer the more explicit version `s.chars().all(|c| c.is_ascii_())`.

This PR doesn't modify the `AsciiExt` trait. There, the `ascii_ctype` methods are still unstable. It is planned to remove those in the future (I think). I had to modify some code in `ascii.rs` to properly implement `AsciiExt` for all types.

Fixes #39658.

6 years agoRollup merge of #45969 - ia0:mpsc_recv_deadline, r=alexcrichton
kennytm [Wed, 29 Nov 2017 10:37:43 +0000 (18:37 +0800)]
Rollup merge of #45969 - ia0:mpsc_recv_deadline, r=alexcrichton

Add std::sync::mpsc::Receiver::recv_deadline()

Essentially renames recv_max_until to recv_deadline (mostly copying recv_timeout
documentation). This function is useful to avoid the often unnecessary call to
Instant::now in recv_timeout (e.g. when the user already has a deadline). A
concrete example would be something along those lines:

```rust
use std::sync::mpsc::Receiver;
use std::time::{Duration, Instant};

/// Reads a batch of elements
///
/// Returns as soon as `max_size` elements have been received or `timeout` expires.
fn recv_batch_timeout<T>(receiver: &Receiver<T>, timeout: Duration, max_size: usize) -> Vec<T> {
    recv_batch_deadline(receiver, Instant::now() + timeout, max_size)
}

/// Reads a batch of elements
///
/// Returns as soon as `max_size` elements have been received or `deadline` is reached.
fn recv_batch_deadline<T>(receiver: &Receiver<T>, deadline: Instant, max_size: usize) -> Vec<T> {
    let mut result = Vec::new();
    while let Ok(x) = receiver.recv_deadline(deadline) {
        result.push(x);
        if result.len() == max_size {
            break;
        }
    }
    result
}
```

6 years agoAuto merge of #46360 - kennytm:workaround-travis-8821, r=kennytm
bors [Wed, 29 Nov 2017 09:44:04 +0000 (09:44 +0000)]
Auto merge of #46360 - kennytm:workaround-travis-8821, r=kennytm

Disable all macOS dist images to workaround travis-ci/travis-ci#8821

See: travis-ci/travis-ci#8821

Currently the [Travis status](https://www.traviscistatus.com/) is all green, I don't know how long it takes Travis to notice and fix it, so I'm merging this in immediately to keep the queue running today.

cc @rust-lang/infra

6 years agoDisable all macOS dist images to workaround travis-ci/travis-ci#8821
kennytm [Wed, 29 Nov 2017 09:39:36 +0000 (17:39 +0800)]
Disable all macOS dist images to workaround travis-ci/travis-ci#8821

[skip ci]

6 years agoUpdate Rustfmt again
Nick Cameron [Wed, 29 Nov 2017 07:33:14 +0000 (20:33 +1300)]
Update Rustfmt again

6 years agoRebased Cargo.lock
Nick Cameron [Wed, 29 Nov 2017 06:17:20 +0000 (19:17 +1300)]
Rebased Cargo.lock

6 years agoUpdate Cargo
Nick Cameron [Mon, 27 Nov 2017 22:13:44 +0000 (11:13 +1300)]
Update Cargo

Pulls in https://github.com/rust-lang/cargo/pull/4762 fixing a broken test which prevented the RLS update

6 years agoUpdate RLS and Rustfmt
Nick Cameron [Tue, 21 Nov 2017 02:42:22 +0000 (15:42 +1300)]
Update RLS and Rustfmt

6 years agoReject '2' as a binary digit in internals of 'b' formatting
David Ross [Wed, 29 Nov 2017 05:35:18 +0000 (21:35 -0800)]
Reject '2' as a binary digit in internals of 'b' formatting

I don't believe the previous code `0 ... 2` would run into any real problems, but it seems confusing to read, given that '2' is never a valid binary digit.

As far as I can tell this code is only ever called from within another private method in the trait which has logic to never hand it '2' anyways. I thought we could change this for clarity anyways.

6 years agoDeploy builds both with asserts enabled and asserts disabled to CI.
Mark Simulacrum [Wed, 29 Nov 2017 02:55:19 +0000 (19:55 -0700)]
Deploy builds both with asserts enabled and asserts disabled to CI.

This also removes uploads to the 'try' bucket, and instead dumps
everything into the two rustc-builds and rustc-builds-alt buckets. This
makes lives easier, as there is only one location for a given "type" of
build, and since we have the git commit hash in the filenames, this is
fine; we won't run into uploads of the same commit.

6 years agoAuto merge of #46207 - kennytm:kill-grep, r=alexcrichton
bors [Tue, 28 Nov 2017 23:23:03 +0000 (23:23 +0000)]
Auto merge of #46207 - kennytm:kill-grep, r=alexcrichton

Replace most call to grep in run-make by a script that cat the input.

Introduced a new `src/etc/cat-and-grep.sh` script (called in run-make as `$(CGREP)`), which prints the input and do a grep simultaneously. This is mainly used to debug spurious failures in run-make, such as the spurious error in #45810, as well as real errors such as #46126.

(cc #40713)

Some `grep` still remains, mainly the `grep -c` calls that count the number of matches and print the result to stdout.

6 years ago*: strip calls to cc::Build::compile
Tamir Duberstein [Sun, 26 Nov 2017 21:43:24 +0000 (16:43 -0500)]
*: strip calls to cc::Build::compile

The documentation states: "The name output should be the name of the
library." and this is already done in more recently-added callers.

6 years agorustc_llvm: use cc::Build::define
Tamir Duberstein [Sun, 26 Nov 2017 21:25:49 +0000 (16:25 -0500)]
rustc_llvm: use cc::Build::define

6 years agorustc_llvm: remove stale references
Tamir Duberstein [Sun, 26 Nov 2017 17:09:35 +0000 (12:09 -0500)]
rustc_llvm: remove stale references

...that were removed in 77c3bfa7429abf87b76ba84108df018d9e9d90e2.

6 years agoAuto merge of #46094 - dtolnay:is_null, r=alexcrichton
bors [Tue, 28 Nov 2017 20:40:51 +0000 (20:40 +0000)]
Auto merge of #46094 - dtolnay:is_null, r=alexcrichton

Remove `T: Sized` on `ptr::is_null()`

Originally from #44932 -- this is purely a revert of the last commit of that PR, which was removing some changes from the previous commits in the PR. So a revert of a revert means this is code written by @cuviper!

@mikeyhew makes a compelling case in https://github.com/rust-lang/rfcs/issues/433#issuecomment-345495505 for why this is the right way to implement `is_null` for trait objects. And the behavior for slices makes sense to me as well.

```diff
  impl<T: ?Sized> *const T {
-     pub fn is_null(self) -> bool where T: Sized;
+     pub fn is_null(self) -> bool;
  }

  impl<T: ?Sized> *mut T {
-     pub fn is_null(self) -> bool where T: Sized;
+     pub fn is_null(self) -> bool;
  }

6 years agoFix doc test of previous commit
Julien Cretin [Tue, 28 Nov 2017 20:22:30 +0000 (21:22 +0100)]
Fix doc test of previous commit

6 years agoAuto merge of #46291 - alexcrichton:wasm-tests, r=kennytm
bors [Tue, 28 Nov 2017 17:58:58 +0000 (17:58 +0000)]
Auto merge of #46291 - alexcrichton:wasm-tests, r=kennytm

ci: Start running wasm32 tests on Travis

This commit allocates a builder to running wasm32 tests on Travis. Not all test
suites pass right now so this is starting out with just the run-pass and the
libcore test suites. This'll hopefully give us a pretty broad set of coverage
for integration in rustc itself as well as a somewhat broad coverage of the llvm
backend itself through integration/unit tests.

6 years agoci: Start running wasm32 tests on Travis
Alex Crichton [Sun, 26 Nov 2017 18:39:16 +0000 (10:39 -0800)]
ci: Start running wasm32 tests on Travis

This commit allocates a builder to running wasm32 tests on Travis. Not all test
suites pass right now so this is starting out with just the run-pass and the
libcore test suites. This'll hopefully give us a pretty broad set of coverage
for integration in rustc itself as well as a somewhat broad coverage of the llvm
backend itself through integration/unit tests.

6 years agoDisable the cdylib-fewer-symbols test for all Windows (test was broken).
kennytm [Tue, 28 Nov 2017 15:38:04 +0000 (23:38 +0800)]
Disable the cdylib-fewer-symbols test for all Windows (test was broken).

6 years agoReplace most call to grep in run-make by a script that cat the input.
kennytm [Thu, 23 Nov 2017 15:19:50 +0000 (23:19 +0800)]
Replace most call to grep in run-make by a script that cat the input.

Introduced a new src/etc/cat-and-grep.sh script (called in run-make as
$(CGREP)), which prints the input and do a grep simultaneously. This is
mainly used to debug spurious failures in run-make, such as the sanitizer
error in #45810, as well as real errors such as #46126.

6 years agomir-borrowck: Update tests
Basile Desloges [Wed, 22 Nov 2017 17:15:56 +0000 (18:15 +0100)]
mir-borrowck: Update tests

6 years agoAuto merge of #46329 - arielb1:incoherent, r=eddyb
bors [Tue, 28 Nov 2017 15:12:58 +0000 (15:12 +0000)]
Auto merge of #46329 - arielb1:incoherent, r=eddyb

Revert "fix treatment of local types in "remote coherence" mode"

That commit had accidentally snuck in into #44884 and it causes regressions. Revert it.

This reverts commit c48650ec25d2e7e872912137e68496248743f1fe.

@bors p=10 - fixes breakage in nightly
r? @eddyb

6 years agoFix since for mpsc_error_conversions
Julien Cretin [Tue, 28 Nov 2017 14:58:36 +0000 (15:58 +0100)]
Fix since for mpsc_error_conversions

6 years agomir-borrowck: Add permission check for `WriteKind::Mutate`
Basile Desloges [Thu, 16 Nov 2017 16:44:24 +0000 (17:44 +0100)]
mir-borrowck: Add permission check for `WriteKind::Mutate`

6 years agoUpdate comment on alternate builds in .travis.yml
Simon Sapin [Tue, 28 Nov 2017 13:26:59 +0000 (14:26 +0100)]
Update comment on alternate builds in .travis.yml

https://github.com/rust-lang/rust/pull/45810#issuecomment-347257640

6 years agoRevert "fix treatment of local types in "remote coherence" mode"
Ariel Ben-Yehuda [Tue, 28 Nov 2017 12:52:34 +0000 (14:52 +0200)]
Revert "fix treatment of local types in "remote coherence" mode"

That commit had accidentally snuck in into #44884. Revert it.

This reverts commit c48650ec25d2e7e872912137e68496248743f1fe.

6 years agomir-borrowck: `describe_lvalue()` can fail if a local doesn't have a name
Basile Desloges [Wed, 22 Nov 2017 16:35:52 +0000 (17:35 +0100)]
mir-borrowck: `describe_lvalue()` can fail if a local doesn't have a name

6 years agoincr.comp.: Add some missing DepNode [input] annotations.
Michael Woerister [Mon, 27 Nov 2017 09:50:15 +0000 (10:50 +0100)]
incr.comp.: Add some missing DepNode [input] annotations.

6 years agoincr.comp.: Make a bunch of query results encodable.
Michael Woerister [Wed, 22 Nov 2017 13:39:32 +0000 (14:39 +0100)]
incr.comp.: Make a bunch of query results encodable.