]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoUpdate RLS
Igor Matuszewski [Thu, 28 Dec 2017 18:46:29 +0000 (19:46 +0100)]
Update RLS

6 years agoAuto merge of #46954 - davidalber:fix-contributor-covenant-link, r=alexcrichton
bors [Thu, 28 Dec 2017 13:24:21 +0000 (13:24 +0000)]
Auto merge of #46954 - davidalber:fix-contributor-covenant-link, r=alexcrichton

Updating Contributor Covenant links

The current link 301s to a new destination.

```sh
$ curl -I http://contributor-covenant.org/version/1/3/0/
HTTP/1.1 301 Moved Permanently
Cache-Control: public, max-age=0, must-revalidate
Content-Length: 0
Content-Type: text/plain
Date: Fri, 22 Dec 2017 21:13:09 GMT
Location: https://www.contributor-covenant.org/version/1/3/0/
Age: 1
Connection: keep-alive
Server: Netlify
```

rust-lang/rust-www#994 fixes this in the Rust site.

6 years agoAuto merge of #47031 - topecongiro:issue-41719, r=jseyfried
bors [Thu, 28 Dec 2017 10:28:16 +0000 (10:28 +0000)]
Auto merge of #47031 - topecongiro:issue-41719, r=jseyfried

Report an error when resolving non-ident macro path failed

Closes #41719.

Please feel free to bikeshed on the error message.

6 years agoAuto merge of #47013 - topecongiro:issue-46655, r=petrochenkov
bors [Thu, 28 Dec 2017 06:45:31 +0000 (06:45 +0000)]
Auto merge of #47013 - topecongiro:issue-46655, r=petrochenkov

Do not expand a derive invocation when derive is not allowed

Closes #46655.

The first commit is what actually closes #46655. The second one is just a refactoring I have done while waiting on a test.

6 years agoAuto merge of #47018 - malbarbo:armv4t, r=alexcrichton
bors [Thu, 28 Dec 2017 04:13:24 +0000 (04:13 +0000)]
Auto merge of #47018 - malbarbo:armv4t, r=alexcrichton

Add armv4t-unknown-linux-gnueabi target

armv4t was left out of https://github.com/rust-lang/rust/pull/37615 (armv5te addition) to be included in a [future PR](https://github.com/rust-lang/rust/pull/37615#issuecomment-259189758).  So this PR adds armv4t target.

armv4t target is useful because the [armel](https://wiki.debian.org/ArmEabiPort) port of Debian targets armv4t

6 years agoPrefer to use attr::contains_name() and attr::find_by_name()
Seiichi Uchida [Tue, 26 Dec 2017 07:52:27 +0000 (16:52 +0900)]
Prefer to use attr::contains_name() and attr::find_by_name()

6 years agoAuto merge of #47017 - topecongiro:issue-33469, r=estebank
bors [Thu, 28 Dec 2017 01:25:38 +0000 (01:25 +0000)]
Auto merge of #47017 - topecongiro:issue-33469, r=estebank

Do not panic on interpolated token inside quote macro

Closes #33469.

6 years agoAuto merge of #47016 - malbarbo:dist-armv5te, r=alexcrichton
bors [Wed, 27 Dec 2017 22:39:00 +0000 (22:39 +0000)]
Auto merge of #47016 - malbarbo:dist-armv5te, r=alexcrichton

Add dist builder for armv5te-unknown-linux-gnueabi (again)

The dist builder was first add in https://github.com/rust-lang/rust/pull/46498 and later remove in https://github.com/rust-lang/rust/pull/46498 because of https://github.com/rust-lang/rust/issues/46822.

https://github.com/rust-lang/rust/issues/46822 seems to be fixed now (I and @green-s have [tested](https://github.com/rust-lang/rust/pull/46498#issuecomment-353901216) it).

6 years agoAuto merge of #47014 - topecongiro:fixed-ices, r=estebank
bors [Wed, 27 Dec 2017 19:52:26 +0000 (19:52 +0000)]
Auto merge of #47014 - topecongiro:fixed-ices, r=estebank

Add tests to fixed ICEs

Closes #27078. Closes #27985. Closes #39848. Closes #42164.
Closes #42479. Closes #45662. Closes #45965. Closes #46152.

6 years agoReport an error when resolving non-ident macro path failed
topecongiro [Wed, 27 Dec 2017 15:46:27 +0000 (00:46 +0900)]
Report an error when resolving non-ident macro path failed

6 years agoAuto merge of #46479 - bkchr:termination_trait, r=arielb1
bors [Wed, 27 Dec 2017 15:41:51 +0000 (15:41 +0000)]
Auto merge of #46479 - bkchr:termination_trait, r=arielb1

Implements RFC 1937: `?` in `main`

This is the first part of the RFC 1937 that supports new
`Termination` trait in the rust `main` function.

Thanks @nikomatsakis, @arielb1 and all other people in the gitter channel for all your help!

The support for doctest and `#[test]` is still missing, bu as @nikomatsakis said, smaller pull requests are better :)

6 years agoAuto merge of #47009 - eddyb:issue-46855, r=arielb1
bors [Wed, 27 Dec 2017 12:54:25 +0000 (12:54 +0000)]
Auto merge of #47009 - eddyb:issue-46855, r=arielb1

rustc_trans: support ZST indexing involving uninhabited types.

Fixes #46855 in a minimal way. I decided against supporting non-memory `Rvalue::Len` in this PR (see https://github.com/rust-lang/rust/issues/46855#issuecomment-352965807), as `PlaceContext::Inspect` is also used for `Rvalue::Discriminant`.

r? @arielb1

6 years agoAuto merge of #47007 - eddyb:issue-46897, r=arielb1
bors [Wed, 27 Dec 2017 10:19:43 +0000 (10:19 +0000)]
Auto merge of #47007 - eddyb:issue-46897, r=arielb1

rustc: don't use union layouts for tagged union enums.

Fixes #46897, fixes #43517 (AFAICT from the testcases).
This PR doesn't add any testcases, we should try to at least get perf ones (cc @Mark-Simulacrum).
I couldn't find an example in those issues where the choice of LLVM array vs struct (with N identical fields) for padding filler types is still needed, *on top of* this change, to prevent excessive LLVM sinking.

r? @arielb1

6 years agoAuto merge of #46977 - est31:column_fix, r=dtolnay
bors [Wed, 27 Dec 2017 07:11:50 +0000 (07:11 +0000)]
Auto merge of #46977 - est31:column_fix, r=dtolnay

 Make the output of the column! macro 1 based

Fixes  #46868.

I didn't add any regression tests as the change already had to change tests inside the codebase.

r? @dtolnay

6 years agoAuto merge of #46803 - estebank:non-ascii-def-span, r=petrochenkov
bors [Wed, 27 Dec 2017 04:23:10 +0000 (04:23 +0000)]
Auto merge of #46803 - estebank:non-ascii-def-span, r=petrochenkov

Use def span for non-ascii ident feature gate error

6 years agoRevert "New generated main returns void"
Bastian Köcher [Wed, 27 Dec 2017 00:23:28 +0000 (01:23 +0100)]
Revert "New generated main returns void"

This reverts commit 267800a7c0834dd8ca93a82a20cb0cdd9e7dc025.

6 years agoUpdate compiler_builtins
Marco A L Barbosa [Wed, 27 Dec 2017 00:22:21 +0000 (22:22 -0200)]
Update compiler_builtins

6 years agoDon't use `process::exit` as it is an `unreachable` on wasm32
Bastian Köcher [Tue, 26 Dec 2017 22:52:20 +0000 (23:52 +0100)]
Don't use `process::exit` as it is an `unreachable` on wasm32

6 years agorustc: Switch `start_fn` to hidden visibility
Alex Crichton [Tue, 26 Dec 2017 22:26:03 +0000 (14:26 -0800)]
rustc: Switch `start_fn` to hidden visibility

This'll avoid exporting a symbol from binaries unnecessarily and should help the
linker clean things up if it can.

6 years agoAuto merge of #46975 - matthewjasper:mir-moveck-asm, r=arielb1
bors [Tue, 26 Dec 2017 20:47:31 +0000 (20:47 +0000)]
Auto merge of #46975 - matthewjasper:mir-moveck-asm, r=arielb1

[MIR Borrowck] Moveck inline asm statements

Closes #45695

New behavior:
* Input operands to `asm!` are moved, direct output operands are initialized.
* Direct, non-read-write outputs match the assignment changes in #46752 (Shallow writes, end borrows).

6 years agorustc: don't use union layouts for tagged union enums.
Eduard-Mihai Burtescu [Mon, 25 Dec 2017 23:40:48 +0000 (01:40 +0200)]
rustc: don't use union layouts for tagged union enums.

6 years agorustc_trans: support ZST indexing involving uninhabited types.
Eduard-Mihai Burtescu [Tue, 26 Dec 2017 01:20:35 +0000 (03:20 +0200)]
rustc_trans: support ZST indexing involving uninhabited types.

6 years agoAuto merge of #46554 - kennytm:45861-step-4-5-6-7-upload-test-result-and-remove-tools...
bors [Tue, 26 Dec 2017 18:03:00 +0000 (18:03 +0000)]
Auto merge of #46554 - kennytm:45861-step-4-5-6-7-upload-test-result-and-remove-toolstate-toml, r=alexcrichton

[auto-toolstate] Upload the toolstate result to an external git repository, and removes BuildExpectation

This PR consists of 3 commits.

1. (Steps 4–6) The `toolstate.json` output previously collected is now pushed to the https://github.com/rust-lang-nursery/rust-toolstate repository.
2. (Step 7) Revert commit ab018c7, thus removing all traces of `BuildExpectation` and `toolstate.toml`.
3. (Step 8) Adjust CONTRIBUTION.md for the new procedure.

These are the last steps of #45861. After this PR, the toolstate will be automatically computed and published to https://rust-lang-nursery.github.io/rust-toolstate/. There is no need to manage toolstate.toml again.

Closes #45861.

6 years agoUpdating Contributor Covenant links
David Alber [Fri, 22 Dec 2017 21:38:34 +0000 (13:38 -0800)]
Updating Contributor Covenant links

The current link 301s to a new destination.

6 years agoClarify toolstate names. Move publish.py to a more convenient location.
kennytm [Thu, 21 Dec 2017 17:16:21 +0000 (01:16 +0800)]
Clarify toolstate names. Move publish.py to a more convenient location.

6 years agoUpdate CONTRIBUTING.md now that toolstate.toml is gone.
kennytm [Thu, 7 Dec 2017 08:37:06 +0000 (16:37 +0800)]
Update CONTRIBUTING.md now that toolstate.toml is gone.

6 years agoRevert "Add a file to trivially disable tool building or testing"
kennytm [Wed, 6 Dec 2017 21:06:48 +0000 (05:06 +0800)]
Revert "Add a file to trivially disable tool building or testing"

This reverts commit ab018c76e14b87f3c9e0b7384cc9b02d94779cd5.

This also adds the `ToolBuild::is_ext_tool` field to replace the previous
`ToolBuild::expectation` field, to indicate whether a build-failure of
certain tool is essential.

6 years agoUpload the toolstate to the remote repository.
kennytm [Mon, 4 Dec 2017 14:31:57 +0000 (22:31 +0800)]
Upload the toolstate to the remote repository.

6 years agocargo update and add miri as the rustc workspace member.
kennytm [Fri, 15 Dec 2017 19:41:58 +0000 (03:41 +0800)]
cargo update and add miri as the rustc workspace member.

6 years agoAuto merge of #46956 - estebank:incompatible-arm-span-label, r=Zoxc
bors [Tue, 26 Dec 2017 15:15:08 +0000 (15:15 +0000)]
Auto merge of #46956 - estebank:incompatible-arm-span-label, r=Zoxc

"incompatible arm" diagnostic span tweak

Use span label instead of span note for single line spans in
"incompatible arm" diagnostic.

6 years agoAdd armv4t-unknown-linux-gnueabi target
Marco A L Barbosa [Tue, 26 Dec 2017 15:05:03 +0000 (13:05 -0200)]
Add armv4t-unknown-linux-gnueabi target

6 years agoDo not panic on interpolated token inside quote macro
Seiichi Uchida [Tue, 26 Dec 2017 13:11:18 +0000 (22:11 +0900)]
Do not panic on interpolated token inside quote macro

6 years agoChange name of `lang_start_real` to `lang_start_internal`
Bastian Köcher [Sat, 23 Dec 2017 23:35:38 +0000 (00:35 +0100)]
Change name of `lang_start_real` to `lang_start_internal`

Also remove `'static` from `__rust_begin_short_backtrace`

6 years agoSplit `lang_start` in two functions to reduce generated code
Bastian Köcher [Sat, 23 Dec 2017 23:15:38 +0000 (00:15 +0100)]
Split `lang_start` in two functions to reduce generated code

6 years agoAdds whitespace
Bastian Köcher [Sat, 23 Dec 2017 00:30:36 +0000 (01:30 +0100)]
Adds whitespace

6 years agoRework the exit failure and success declaration for wasm32
Bastian Köcher [Fri, 22 Dec 2017 23:47:25 +0000 (00:47 +0100)]
Rework the exit failure and success declaration for wasm32

6 years agoRevert "Just compare the symbol names and types, not the addresses"
Bastian Köcher [Fri, 22 Dec 2017 20:16:09 +0000 (21:16 +0100)]
Revert "Just compare the symbol names and types, not the addresses"

This reverts commit 7d4d98e5c870a2dcdca8ea3aa47ecee680a35e60.

6 years agoUse `start` for the `sepcomp-inlining` test
Bastian Köcher [Fri, 22 Dec 2017 20:06:18 +0000 (21:06 +0100)]
Use `start` for the `sepcomp-inlining` test

6 years agoUse move for optimization purposes
Bastian Köcher [Fri, 22 Dec 2017 19:39:31 +0000 (20:39 +0100)]
Use move for optimization purposes

6 years agoDon't emit the termination lang item in tests
Bastian Köcher [Fri, 22 Dec 2017 17:23:47 +0000 (18:23 +0100)]
Don't emit the termination lang item in tests

6 years agoThe test functions are now in the same compile unit
Bastian Köcher [Fri, 22 Dec 2017 15:50:50 +0000 (16:50 +0100)]
The test functions are now in the same compile unit

6 years agoRemoves some obscure transmute call in `lang_start`
Bastian Köcher [Fri, 22 Dec 2017 15:11:09 +0000 (16:11 +0100)]
Removes some obscure transmute call in `lang_start`

6 years agoJust compare the symbol names and types, not the addresses
Bastian Köcher [Fri, 22 Dec 2017 14:50:42 +0000 (15:50 +0100)]
Just compare the symbol names and types, not the addresses

6 years agoConvert codegen-unit tests to use `start` instead of `main`
Bastian Köcher [Fri, 22 Dec 2017 14:31:51 +0000 (15:31 +0100)]
Convert codegen-unit tests to use `start` instead of `main`

The new Termination traits brings in the unwinding machinery and that
blows up the required `TRANS_ITEM`s.

6 years agoAdds termination_trait feature gate
Bastian Köcher [Fri, 22 Dec 2017 00:11:57 +0000 (01:11 +0100)]
Adds termination_trait feature gate

6 years agoFixes codegen-units tests
Bastian Köcher [Thu, 21 Dec 2017 16:25:36 +0000 (17:25 +0100)]
Fixes codegen-units tests

6 years agoNew generated main returns void
Bastian Köcher [Thu, 21 Dec 2017 15:37:14 +0000 (16:37 +0100)]
New generated main returns void

6 years agoFall back to main -> () when termination trait language item is not enabled
Bastian Köcher [Thu, 21 Dec 2017 13:20:03 +0000 (14:20 +0100)]
Fall back to main -> () when termination trait language item is not enabled

6 years agoFixes tests
Bastian Köcher [Thu, 21 Dec 2017 12:07:50 +0000 (13:07 +0100)]
Fixes tests

6 years agoFixes compilation errors and adds proposed improvements
Bastian Köcher [Thu, 21 Dec 2017 11:03:01 +0000 (12:03 +0100)]
Fixes compilation errors and adds proposed improvements

6 years agoFixes compile bug caused by upstream changes
Bastian Köcher [Tue, 5 Dec 2017 11:10:47 +0000 (12:10 +0100)]
Fixes compile bug caused by upstream changes

6 years agoconvert print-type-sizes to use `start` instead of `main`
Niko Matsakis [Tue, 5 Dec 2017 10:03:59 +0000 (05:03 -0500)]
convert print-type-sizes to use `start` instead of `main`

This avoids bringing in unwind machinery.

6 years agoavoid ICE when fields are not laid out in order
Niko Matsakis [Tue, 5 Dec 2017 10:00:35 +0000 (05:00 -0500)]
avoid ICE when fields are not laid out in order

6 years agoImplements RFC 1937: `?` in `main`
Bastian Köcher [Sun, 3 Dec 2017 21:16:24 +0000 (22:16 +0100)]
Implements RFC 1937: `?` in `main`

This is the first part of the RFC 1937 that supports new
`Termination` trait in the rust `main` function.

6 years agoAdd dist builder for armv5te-unknown-linux-gnueabi
Marco A L Barbosa [Tue, 26 Dec 2017 11:21:09 +0000 (09:21 -0200)]
Add dist builder for armv5te-unknown-linux-gnueabi

6 years agoAuto merge of #46941 - ScottAbbey:freebsd-build-update, r=alexcrichton
bors [Tue, 26 Dec 2017 11:16:12 +0000 (11:16 +0000)]
Auto merge of #46941 - ScottAbbey:freebsd-build-update, r=alexcrichton

Re-do the FreeBSD cross-builds to use Clang and libc++. Fixes #44433

Reviving #45077, from @jld:

> The main goal here is to use FreeBSD's normal libc++, instead of
> statically linking the libstdc++ packaged with GCC, because that
> libstdc++ has bugs that cause rustc to deadlock inside LLVM.
>
> But the easiest way to use libc++ is to switch the build from GCC to
> Clang, and the Clang package in the Ubuntu image already knows how to
> cross-compile (given a sysroot and preferably cross-binutils), so the
> toolchain script now uses that instead of building a custom compiler.
>
> This also de-duplicates the build-toolchain.sh script.

#45077 was close but didn't quite make it.  I rebased @jld's work off the current `master` and started with that.

I was able to determine that this Travis error (https://github.com/rust-lang/rust/pull/45077#issuecomment-336029862) was ultimately caused by `src/librustc_llvm/build.rs` attempting to follow a wrong value in `LLVM_STATIC_STDCPP` (https://github.com/rust-lang/rust/pull/45077#issuecomment-352639456).

I looked at the downstream port for FreeBSD (https://svnweb.freebsd.org/ports/head/lang/rust/) and it seems like they do not use `--enable-llvm-static-stdcpp`.

Since `libc++` is included in the FreeBSD 10+ base system, we don't need to statically link it either?

So in b989428f7dec7b52d68bed6a21e9b5b0a8086267 I have set the FreeBSD build to not actually use `LLVM_STATIC_STDCPP`.

I was able to run `./src/ci/docker/run.sh` with both `dist-i686-freebsd` and `dist-x86_64-freebsd` successfully and in about 1 minute of testing it seemed like the dist-x86_64-freebsd results worked on a FreeBSD 11 system.

It should fix #44433, which seems to be affecting many potential users.  Also FreeBSD users should be able to `./x.py build` which should help anyone who wants to upstream fixes for FreeBSD.

Questions:

Does this approach seem to be the right way to go? Do we actually really want to statically link `libc++`? (I tried that here, but it ultimately ran into a roadblock on x86_64: https://github.com/rust-lang/rust/pull/45077#issuecomment-353293414)

Can we rewrite the comment here to be more clear about why some systems aren't going to actually use this option:
https://github.com/rust-lang/rust/blob/b989428f7dec7b52d68bed6a21e9b5b0a8086267/src/bootstrap/compile.rs#L550-L553

How does this affect users of older FreeBSD systems? It seemed like no one was complaining about using a 10.3 base version in the thread for #45077.  FreeBSD seems to only officially support 10.3, 10.4, and 11.x right now, do we have to consider older users? The `libc++` stuff came in for FreeBSD 10, older FreeBSD used `libstdc++`.

Looks like @alexcrichton was leading the discussion on the previous issue:

r? @alexcrichton

Let me know what I can do to help get this through.

6 years agoAdd tests to fixed ICEs
Seiichi Uchida [Tue, 26 Dec 2017 09:41:56 +0000 (18:41 +0900)]
Add tests to fixed ICEs

Closes #27078. Closes #27985. Closes #39848. Closes #42164.
Closes #42479. Closes #45152. Closes #45662. Closes #45876.
Closes #45965.

6 years agoAuto merge of #47012 - kennytm:rollup, r=kennytm
bors [Tue, 26 Dec 2017 08:33:23 +0000 (08:33 +0000)]
Auto merge of #47012 - kennytm:rollup, r=kennytm

Rollup of 8 pull requests

- Successful merges: #46928, #46930, #46933, #46939, #46940, #46943, #46979, #46986
- Failed merges:

6 years agoDo not expand a derive invocation when derive is not allowed
Seiichi Uchida [Tue, 26 Dec 2017 07:47:32 +0000 (16:47 +0900)]
Do not expand a derive invocation when derive is not allowed

1. Change the return type of `expand_invoc()` and its subroutines to
   `Option<Expansion>` from `Expansion`.
2. Return `None` when expanding a derive invocation if the item cannot
   have derive on it (in `expand_derive_invoc()`).

6 years agoRollup merge of #46986 - nvzqz:basic-usage, r=steveklabnik
kennytm [Tue, 26 Dec 2017 07:19:00 +0000 (15:19 +0800)]
Rollup merge of #46986 - nvzqz:basic-usage, r=steveklabnik

Add "Basic Usage" to int min_value and max_value docs

This adds "Basic Usage:" to the docs of `min_value` and `max_value`, which makes it consistent with docs of other integer methods.

6 years agoRollup merge of #46979 - clarcharr:rustc_docs, r=arielb1
kennytm [Tue, 26 Dec 2017 07:18:59 +0000 (15:18 +0800)]
Rollup merge of #46979 - clarcharr:rustc_docs, r=arielb1

Make internal docs build properly.

`'1` isn't a valid lifetime and resulted in a syntax error.

6 years agoRollup merge of #46943 - malbarbo:process-test-busybox, r=alexcrichton
kennytm [Tue, 26 Dec 2017 07:18:59 +0000 (15:18 +0800)]
Rollup merge of #46943 - malbarbo:process-test-busybox, r=alexcrichton

Fix process test when using busybox mkdir

busybox mkdir . returns 0
busybox mkdir ./ returns 1

6 years agoRollup merge of #46940 - EdSchouten:cloudabi, r=alexcrichton
kennytm [Tue, 26 Dec 2017 07:18:58 +0000 (15:18 +0800)]
Rollup merge of #46940 - EdSchouten:cloudabi, r=alexcrichton

Add support for CloudABI targets to the rustc backend.

CloudABI is a sandboxed UNIX-like runtime environment. It is a
programming environment that uses a capability-based security model. In
practice this means that many POSIX interfaces are present, except for
ones that try to access resources out of thin air. For example, open()
is gone, but openat() is present.

Right now I'm at the point where I can compile very basic CloudABI
applications on all four supported architectures (ARM and x86, 32 and 64
bits). The next step will be to get libstd to work. Patches for that are
outside the scope of this change.

More info: https://nuxi.nl/cloudabi/ https://github.com/NuxiNL/cloudlibc/

6 years agoRollup merge of #46939 - davidalber:code-of-conduct-mod-team-link, r=kennytm
kennytm [Tue, 26 Dec 2017 07:18:57 +0000 (15:18 +0800)]
Rollup merge of #46939 - davidalber:code-of-conduct-mod-team-link, r=kennytm

Fixing Rust Moderation Team link in Code of Conduct

The [Code of Conduct](https://github.com/rust-lang/rust/blob/master/CODE_OF_CONDUCT.md) has two broken links to the Rust Moderation Team.
- The current link is https://github.com/rust-lang/rust/blob/master/team.html#Moderation. That happened because the link is relative.
- The link in this PR is https://www.rust-lang.org/team.html#Moderation-team. Note: at the moment this is redirected client-side to a language-specific page and loses the fragment identifier. rust-lang/rust-www#992 aims to correct that.

6 years agoRollup merge of #46933 - clarcharr:float_docs, r=steveklabnik
kennytm [Tue, 26 Dec 2017 07:18:56 +0000 (15:18 +0800)]
Rollup merge of #46933 - clarcharr:float_docs, r=steveklabnik

Make core::f32/f64 docs match std.

For some reason these weren't in sync.

6 years agoRollup merge of #46930 - lucis-fluxum:patch-1, r=QuietMisdreavus
kennytm [Tue, 26 Dec 2017 07:18:55 +0000 (15:18 +0800)]
Rollup merge of #46930 - lucis-fluxum:patch-1, r=QuietMisdreavus

Clarify docs for split_at_mut

The `&mut` here didn't make immediate sense to me. Keep the docs for this function consistent with the non-mut version.

6 years agoRollup merge of #46928 - varkor:contrib-10, r=alexcrichton
kennytm [Tue, 26 Dec 2017 07:18:53 +0000 (15:18 +0800)]
Rollup merge of #46928 - varkor:contrib-10, r=alexcrichton

Correct the return type for `x86_mm256_sad_epu8`

Fixes #43439.

6 years agoAuto merge of #47000 - kennytm:follow-up-46924, r=arielb1
bors [Tue, 26 Dec 2017 05:46:11 +0000 (05:46 +0000)]
Auto merge of #47000 - kennytm:follow-up-46924, r=arielb1

Follow up to #46924, fix massive spurious failure when starting docker

It seems using `fe80::/64` causes `docker start` to fail with "Address already in use". Try to change to a unique local address range instead.

`fe80::/64` is a link-local address (similar to `169.254.0.0/16` in IPv4). Let's try to use a random "private network" address to see whether that fixes things.

cc #47002

r? @aidanhs

6 years agoMake internal docs build properly.
Clar Charr [Sun, 24 Dec 2017 03:03:04 +0000 (22:03 -0500)]
Make internal docs build properly.

6 years agoAuto merge of #46973 - arielb1:tuple-casting, r=estebank
bors [Mon, 25 Dec 2017 23:00:39 +0000 (23:00 +0000)]
Auto merge of #46973 - arielb1:tuple-casting, r=estebank

Update check::cast::pointer_kind logic to new rustc

Make the match exhaustive, adding handling for anonymous types and
tuple coercions on the way.

Also, exit early when type errors are detected, to avoid error cascades
and the like.

Fixes #33690.
Fixes #46365.
Fixes #46880.

6 years agoFollow up to #46924
kennytm [Mon, 25 Dec 2017 18:36:17 +0000 (02:36 +0800)]
Follow up to #46924

It seems using `fe80::/64` causes `docker start` to fail with "Address
already in use". Try to change to a unique local address range instead.

6 years agoFixup some previous configuration errors.
kennytm [Thu, 7 Dec 2017 14:46:21 +0000 (22:46 +0800)]
Fixup some previous configuration errors.

6 years ago"incompatible arm" diagnostic span tweak
Esteban Küber [Fri, 22 Dec 2017 23:55:44 +0000 (15:55 -0800)]
"incompatible arm" diagnostic span tweak

Use span label instead of span note for single line spans in
"incompatible arm" diagnostic.

6 years agoFix docs mistake
est31 [Mon, 25 Dec 2017 13:15:59 +0000 (14:15 +0100)]
Fix docs mistake

6 years agoAuto merge of #46971 - green-s:master, r=alexcrichton
bors [Mon, 25 Dec 2017 12:55:52 +0000 (12:55 +0000)]
Auto merge of #46971 - green-s:master, r=alexcrichton

Update compiler_builtins

Fixes #46822 (see https://github.com/rust-lang-nursery/compiler-builtins/pull/219)

6 years agoAuto merge of #46949 - davidtwco:issue-46631, r=arielb1
bors [Mon, 25 Dec 2017 10:07:28 +0000 (10:07 +0000)]
Auto merge of #46949 - davidtwco:issue-46631, r=arielb1

MIR borrowck: no "move occurs because `X` is not Copy` error

Fixes #46631.

r? @arielb1

6 years agoAuto merge of #46924 - kennytm:revert-46694, r=aidanhs
bors [Mon, 25 Dec 2017 07:29:16 +0000 (07:29 +0000)]
Auto merge of #46924 - kennytm:revert-46694, r=aidanhs

Revert #46694 (Temporarily use the old Travis image)

This PR reverts #46694, and applies the solution recommended in https://github.com/travis-ci/travis-ci/issues/8891#issuecomment-353403729.

r? @aidanhs

6 years agoAuto merge of #46914 - mikeyhew:raw_pointer_self, r=arielb1
bors [Mon, 25 Dec 2017 04:55:57 +0000 (04:55 +0000)]
Auto merge of #46914 - mikeyhew:raw_pointer_self, r=arielb1

Convert warning about `*const _` to a future-compat lint

#46664 was merged before I could convert the soft warning about method lookup on `*const _` into a future-compatibility lint. This PR makes that change.

fixes #46837
tracking issue for the future-compatibility lint: #46906

r? @arielb1

6 years agoAuto merge of #46910 - alexcrichton:thinlto-default, r=michaelwoerister
bors [Mon, 25 Dec 2017 02:14:35 +0000 (02:14 +0000)]
Auto merge of #46910 - alexcrichton:thinlto-default, r=michaelwoerister

rustc: Set release mode cgus to 16 by default

This commit is the next attempt to enable multiple codegen units by default in
release mode, getting some of those sweet, sweet parallelism wins by running
codegen in parallel. Performance should not be lost due to ThinLTO being on by
default as well.

Closes #45320

6 years agoAuto merge of #46899 - m4b:linkage_name_equals_symbol_name, r=michaelwoerister
bors [Sun, 24 Dec 2017 23:35:19 +0000 (23:35 +0000)]
Auto merge of #46899 - m4b:linkage_name_equals_symbol_name, r=michaelwoerister

Set the dwarf linkage_name to the mangled name

ref #46453

@michaelwoerister or anyone else who knows, i'm not sure if this is the correct instance to pass here (or how to get the correct one precisely): https://github.com//m4b/rust/blob/5a94a48678ec0a20ea6a63a783e63546bf9459b1/src/librustc_trans/debuginfo/namespace.rs#L36

So don't merge this yet, I'd like to learn about correct instance first; however, I think this already fixes a bunch of weirdness i'm seeing debugging from time to time, not to mention backtraces in gdb via `bt` are now ~readable~ meaningful :tada:

E.g.:

new:
```
(gdb) bt
#0  <inline::Foo as core::convert::From<()>>::from () at /home/m4b/tmp/bad_debug/inline.rs:11
#1  0x000055555555a35d in inline::deadbeef () at /home/m4b/tmp/bad_debug/inline.rs:16
#2  0x000055555555a380 in inline::main () at /home/m4b/tmp/bad_debug/inline.rs:20
```

old:
```
(gdb) bt
#0  inline::{{impl}}::from () at /home/m4b/tmp/bad_debug/inline.rs:11
#1  0x000055555555b0ed in inline::deadbeef () at /home/m4b/tmp/bad_debug/inline.rs:16
#2  0x000055555555b120 in inline::main () at /home/m4b/tmp/bad_debug/inline.rs:20
```

6 years agoAuto merge of #46789 - Diggsey:command-env-capture, r=dtolnay
bors [Sun, 24 Dec 2017 20:57:20 +0000 (20:57 +0000)]
Auto merge of #46789 - Diggsey:command-env-capture, r=dtolnay

Capture `Command` environment at spawn

Fixes #28975

This tracks a set of changes to the environment and then replays them at spawn time.

6 years agoAdd "Basic Usage" to int min_value, max_value docs
Nikolai Vazquez [Sun, 24 Dec 2017 19:01:48 +0000 (14:01 -0500)]
Add "Basic Usage" to int min_value, max_value docs

6 years agoAuto merge of #46630 - alexcrichton:update-git2, r=nikomatsakis
bors [Sun, 24 Dec 2017 18:05:00 +0000 (18:05 +0000)]
Auto merge of #46630 - alexcrichton:update-git2, r=nikomatsakis

Update Cargo and its dependencies

Just a routine update!

6 years agoUpdate Cargo and its dependencies
Alex Crichton [Sun, 10 Dec 2017 17:42:49 +0000 (09:42 -0800)]
Update Cargo and its dependencies

Just a routine update!

6 years agoAuto merge of #46896 - arielb1:shadow-scope, r=eddyb
bors [Sun, 24 Dec 2017 15:26:17 +0000 (15:26 +0000)]
Auto merge of #46896 - arielb1:shadow-scope, r=eddyb

fix debuginfo scoping of let-statements

r? @eddyb

6 years agoCapture environment at spawn
Diggory Blake [Sun, 17 Dec 2017 15:21:47 +0000 (15:21 +0000)]
Capture environment at spawn

6 years agoAuto merge of #46894 - detrumi:fix-const-eval-trait, r=eddyb
bors [Sun, 24 Dec 2017 12:48:57 +0000 (12:48 +0000)]
Auto merge of #46894 - detrumi:fix-const-eval-trait, r=eddyb

Const-eval array lengths in rustdoc.

Fixes #46727
r? @eddyb

Big thanks to @eddyb for helping me figure this out.

6 years agoAuto merge of #46859 - gereeter:uninhabited-unions, r=eddyb
bors [Sun, 24 Dec 2017 10:07:22 +0000 (10:07 +0000)]
Auto merge of #46859 - gereeter:uninhabited-unions, r=eddyb

Only mark unions as uninhabited if all of their fields are uninhabited

Fixes #46845.

6 years agoHandle casts to integer/float variables
Ariel Ben-Yehuda [Sun, 24 Dec 2017 09:40:54 +0000 (11:40 +0200)]
Handle casts to integer/float variables

These can happen if prior errors disable defaulting.

Fixes #43825.

6 years agoAuto merge of #46888 - cramertj:nested-impl-trait-error, r=nikomatsakis
bors [Sun, 24 Dec 2017 07:34:13 +0000 (07:34 +0000)]
Auto merge of #46888 - cramertj:nested-impl-trait-error, r=nikomatsakis

Add a feature gate for nested uses of `impl Trait`

This allows us to delay stabilization of nested `impl Trait` until we have a plan to solve the problem posed [here](https://github.com/rust-lang/rust/issues/34511#issuecomment-350715858).

r? @nikomatsakis

6 years agoAuto merge of #46833 - diwic:7c-abort-ffi, r=arielb1
bors [Sun, 24 Dec 2017 02:42:15 +0000 (02:42 +0000)]
Auto merge of #46833 - diwic:7c-abort-ffi, r=arielb1

Prevent unwinding past FFI boundaries

Second attempt to write a patch to solve this.

r? @nikomatsakis

~~So, my biggest issue with this patch is the way the patch determines *what* functions should have an abort landing pad (in `construct_fn`). I would ideally have this code match [src/librustc_trans/callee.rs::get_fn](https://github.com/rust-lang/rust/blob/master/src/librustc_trans/callee.rs#L107-L115) but couldn't find an id that returns true for `is_foreign_item`. Also tried `tcx.has_attr("unwind")` with no luck.~~ FIXED

Other issues:

 * llvm.trap is an SIGILL on amd64. Ideally we could use panic-abort's version of aborting which is nicer but we don't want to depend on that library...

 * ~~Mir inlining is a stub currently.~~ FIXED (no-op)

Also, when reviewing please take into account that I'm new to the code and only partially know what I'm doing... and that I've mostly made made matches on `TerminatorKind::Abort` match either `TerminatorKind::Resume` or `TerminatorKind::Unreachable` based on what looked best.

6 years agoRemove unnecessary assert that unions have only one variant
Jonathan S [Sun, 24 Dec 2017 02:38:36 +0000 (20:38 -0600)]
Remove unnecessary assert that unions have only one variant

6 years agoFix tests
est31 [Sun, 24 Dec 2017 02:02:28 +0000 (03:02 +0100)]
Fix tests

6 years agoMake column macro output 1 based and document it
est31 [Sun, 24 Dec 2017 01:20:06 +0000 (02:20 +0100)]
Make column macro output 1 based and document it

6 years agorustc: Set release mode cgus to 16 by default
Alex Crichton [Thu, 21 Dec 2017 15:03:16 +0000 (07:03 -0800)]
rustc: Set release mode cgus to 16 by default

This commit is the next attempt to enable multiple codegen units by default in
release mode, getting some of those sweet, sweet parallelism wins by running
codegen in parallel. Performance should not be lost due to ThinLTO being on by
default as well.

Closes #45320

6 years agoGive MIR borrowck a better understanding of inline asm
Matthew Jasper [Sat, 23 Dec 2017 23:45:07 +0000 (23:45 +0000)]
Give MIR borrowck a better understanding of inline asm

6 years agoAuto merge of #46881 - michaelwoerister:ensure-coherence, r=nikomatsakis
bors [Sat, 23 Dec 2017 23:06:13 +0000 (23:06 +0000)]
Auto merge of #46881 - michaelwoerister:ensure-coherence, r=nikomatsakis

incr.comp.: Cache check_match and use ensure() for coherence-related queries.

Some minor optimizations.

r? @nikomatsakis

6 years agoUpdate check::cast::pointer_kind logic to new rustc
Ariel Ben-Yehuda [Sat, 23 Dec 2017 21:38:09 +0000 (23:38 +0200)]
Update check::cast::pointer_kind logic to new rustc

Make the match exhaustive, adding handling for anonymous types and
tuple coercions on the way.

Also, exit early when type errors are detected, to avoid error cascades
and the like.

6 years agoUpdate compiler_builtins
Sam Green [Sat, 23 Dec 2017 19:03:54 +0000 (19:03 +0000)]
Update compiler_builtins

6 years agofix doctests in libcore
Michael Hewson [Sat, 23 Dec 2017 17:36:04 +0000 (12:36 -0500)]
fix doctests in libcore