bors [Fri, 10 May 2019 19:56:15 +0000 (19:56 +0000)]
Auto merge of #60708 - Centril:rollup-j5smdo0, r=Centril
Rollup of 6 pull requests
Successful merges:
- #60529 (RFC 2008: Uninhabitedness fixes for enum variants and tests)
- #60620 (Fix a couple of FIXMEs in ext::tt::transcribe)
- #60659 (Tweak `Symbol` and `InternedString`)
- #60692 (Extend #60676 test for nested mut patterns.)
- #60697 (add regression test for #60629)
- #60701 (Update mailmap for mati865)
Rollup merge of #60697 - hellow554:fix_60629, r=michaelwoerister
add regression test for #60629
This bug was fixed, but I don't know which one. (I think it even doesn't matter at all).
Added a regression test.
```
op@OP ~/m/r/s/t/incremental> rustc --version
rustc 1.35.0-nightly (acd8dd6a5 2019-04-05)
op@OP ~/m/r/s/t/incremental> rustc -C incremental= --cfg rpass1 issue-60629.rs
warning: struct is never constructed: `A`
--> issue-60629.rs:3:1
|
3 | struct A;
| ^^^^^^^^^
|
= note: #[warn(dead_code)] on by default
op@OP ~/m/r/s/t/incremental> rustc -C incremental= --cfg rpass2 issue-60629.rs
error: internal compiler error: src/librustc/ty/query/plumbing.rs:1195: Cannot force dep node: coherent_trait(core[c27c]::ops[0]::drop[0]::Drop[0])
thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:635:9
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
error: aborting due to previous error
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: rustc 1.35.0-nightly (acd8dd6a5 2019-04-05) running on x86_64-unknown-linux-gnu
note: compiler flags: -C incremental
```
with latest nightly it does not crash anymore, so nothing more to do.
Fixes #60629
(accidentally removed the remote branch on github, therefore GH closed the other PR.)
Rollup merge of #60620 - mark-i-m:transcribe-2, r=petrochenkov
Fix a couple of FIXMEs in ext::tt::transcribe
_Blocked on #60618_
A crater run would be nice to make sure my understanding is correct. A quick google search seems to indicate these are extremely rare errors if they are possible (which I don't believe they are).
r? @petrochenkov
cc #2887 (there is only one FIXME left and it is hygiene-related)
Rollup merge of #60529 - davidtwco:rfc-2008-uninhabited, r=petrochenkov
RFC 2008: Uninhabitedness fixes for enum variants and tests
Part of #44109.
At the request of @Centril, this PR adds tests asserting that uninhabited non-exhaustive types are considered inhabited in extern crates. In adding these tests, I fixed an oversight in the implementation of RFC 2008 on enum variants that resulted in non-exhaustive enum variants being considered uninhabited in extern crates.
Issue #42778 was formerly easy to reproduce on two big-endian targets,
`powerpc64` and `s390x`, so we disabled SIMD on this function for all
big-endian targets as a workaround.
I have re-tested this code on `powerpc64` and `s390x`, each with the
bundled LLVM 8 and with external LLVM 7 and LLVM 6, and the problems no
longer appear. So it seems safe to remove this workaround, although I'm
still a little uncomfortable that we never found a root-cause...
bors [Fri, 10 May 2019 07:02:38 +0000 (07:02 +0000)]
Auto merge of #60585 - sunfishcode:wasm32-wasi, r=alexcrichton
Omit the vendor component in the WASI triple
This renames wasm32-unknown-wasi to wasm32-wasi, omitting the vendor
component. This follows aarch64-linux-android, x86_64-fuchsia, and others in
omitting the vendor field, which has the advantage of aligning with the
[multiarch tuple](https://wiki.debian.org/Multiarch/Tuples), and of being
less noisy.
bors [Fri, 10 May 2019 00:51:14 +0000 (00:51 +0000)]
Auto merge of #60683 - Centril:rollup-p05qh5d, r=Centril
Rollup of 8 pull requests
Successful merges:
- #59348 (Clean up and add tests for slice drop shims)
- #60188 (Identify when a stmt could have been parsed as an expr)
- #60234 (std: Derive `Default` for `io::Cursor`)
- #60618 (Comment ext::tt::transcribe)
- #60648 (Skip codegen for one UI test with long file path)
- #60671 (remove unneeded `extern crate`s from build tools)
- #60675 (Remove the old await! macro)
- #60676 (Fix async desugaring providing wrong input to procedural macros.)
Rollup merge of #60676 - davidtwco:issue-60674, r=cramertj
Fix async desugaring providing wrong input to procedural macros.
Fixes #60674.
This PR fixes a minor oversight introduced by #60535 where unused `mut` binding modes were removed from the arguments to an `async fn` (as they were added to the statement that we insert into the closure body). However, this meant that the input to procedural macros was incorrect. This removes that and instead fixes the `unused_mut` error that it avoided.
Rollup merge of #60648 - petrochenkov:shorten2, r=Dylan-DPC
Skip codegen for one UI test with long file path
The path to this test is so long that object files produced by it hit some path length limit on Windows and linker cannot find them.
The workaround here is to skip codegen and avoid producing object files, this test doesn't need them anyway.
Rollup merge of #60188 - estebank:recover-block, r=varkor
Identify when a stmt could have been parsed as an expr
There are some expressions that can be parsed as a statement without
a trailing semicolon depending on the context, which can lead to
confusing errors due to the same looking code being accepted in some
places and not others. Identify these cases and suggest enclosing in
parenthesis making the parse non-ambiguous without changing the
accepted grammar.
bors [Thu, 9 May 2019 21:50:46 +0000 (21:50 +0000)]
Auto merge of #60665 - pietroalbini:upgrade-ci-images, r=alexcrichton
Upgrade non-LTS Ubuntu images in CI
This PR bumps `dist-various-2` to 18.04 LTS and both `x86_64-gnu` and `x86_64-gnu-debug` to 19.04.
Another change is the switch to [rust-lang/mirror-google-fuchsia-zircon](https://github.com/rust-lang/mirror-google-fuchsia-zircon) as the Zircon repository, used during Fuchsia tests: the original repository ([fuchsia.googlesource.com/zircon](https://fuchsia.googlesource.com/zircon)) is now behind a login wall and it doesn't contain anything at all.
r? @alexcrichton
cc @cramertj -- what's happening on the Fuchsia side?
bors [Thu, 9 May 2019 18:43:00 +0000 (18:43 +0000)]
Auto merge of #60672 - Centril:rollup-fhcx463, r=Centril
Rollup of 5 pull requests
Successful merges:
- #60601 (Add a `cast` method to raw pointers.)
- #60638 (pin: make the to-module link more visible)
- #60647 (cleanup: Remove `DefIndexAddressSpace`)
- #60656 (Inline some Cursor calls for slices)
- #60657 (Stabilize and re-export core::array in std)
Dan Gohman [Wed, 1 May 2019 02:37:25 +0000 (19:37 -0700)]
Omit the vendor component in the WASI triple
This renames wasm32-unknown-wasi to wasm32-wasi, omitting the vendor
component. This follows aarch64-linux-android, x86_64-fuchsia, and others in
omitting the vendor field, which has the advantage of aligning with the
[multiarch tuple](https://wiki.debian.org/Multiarch/Tuples), and of being
less noisy.
David Wood [Thu, 9 May 2019 18:10:27 +0000 (19:10 +0100)]
Do not modify mutability of simple bindings.
This commit removes the modification of the mutability of simple
bindings. While the mutability isn't used, it is important that it is
kept so that the input to procedural macros matches what the user wrote.
This commit also modifies the span of the binding mode so that it is
considered a compiler desugaring and won't be linted against for being
unused..
Rollup merge of #60656 - petertodd:2019-inline-cursor-over-slice, r=sfackler
Inline some Cursor calls for slices
(Partially) brings back https://github.com/rust-lang/rust/pull/33921
I've noticed in some serialization code I was writing that writes to slices produce much, much, worse code than you'd expect even with optimizations turned on. For example, you'd expect something like this to be zero cost:
```
use std::io::{self, Cursor, Write};
pub fn serialize((a, b): (u64, u64)) -> [u8;8+8] {
let mut r = [0u8;16];
{
let mut w = Cursor::new(&mut r[..]);
w.write(&a.to_le_bytes()).unwrap();
w.write(&b.to_le_bytes()).unwrap();
}
r
}
```
...but it compiles down to [dozens of instructions](https://rust.godbolt.org/z/bdwDzb) because the `slice_write()` calls aren't inlined, which in turn means `unwrap()` can't be optimized away, and so on.
To be clear, this pull-req isn't sufficient by itself: if we want to go down that path we also need to add `#[inline]`'s to the default implementations for functions like `write_all()` in the `Write` trait and so on, or implement them separately in the `Cursor` impls. But I figured I'd start a conversation about what tradeoffs we're expecting here.
Rollup merge of #60647 - petrochenkov:nospace, r=michaelwoerister
cleanup: Remove `DefIndexAddressSpace`
The scheme with two address spaces for `DefIndex` was needed in the past, but apparently not needed anymore (after removing `DefId`s from locals and `HirId`-ification).
Pietro Albini [Thu, 9 May 2019 09:32:41 +0000 (11:32 +0200)]
ci: use our own mirror for fuchsia's zircon repository
The canonical repository on fuchsia.googlesource.com is not accessible
anymore, neither for anonymous access nor logged in access. This commit
switches our CI to fetch the repository from our own mirror.
bors [Wed, 8 May 2019 22:59:23 +0000 (22:59 +0000)]
Auto merge of #60651 - Centril:rollup-zoamjfk, r=Centril
Rollup of 8 pull requests
Successful merges:
- #59979 (to_xe_bytes for isize and usize returns an array of different size)
- #60491 (std: Update compiler-builtins crate)
- #60550 (Add tests for concrete const types)
- #60572 (Add test for #59972)
- #60627 (test for #50518)
- #60634 (Document + Cleanup lang_items.rs)
- #60641 (Instead of ICEing on incorrect pattern, use delay_span_bug)
- #60644 (Use `delay_span_bug` for "Failed to unify obligation")
Where's the best place to add this test? I *think* we want "compile-pass" for this test (no need to run a binary, and not running saves us a millisecond of process creation) , but there's no compile-pass anymore.
Should this be UI test with empty stdout, stderr and zero return code?
Rollup merge of #60550 - skinny121:concrete_const_tests, r=varkor
Add tests for concrete const types
In response to the request for help in https://github.com/rust-lang/rust/issues/44580#issuecomment-488819344, I have added several ui tests around the use of concrete const types, i.e. A<2>.
Rollup merge of #59979 - stepancheg:num-size, r=ehuss
to_xe_bytes for isize and usize returns an array of different size
... on different platforms.
Official rustdoc of
[`usize::to_le_bytes`](https://doc.rust-lang.org/std/primitive.usize.html#method.to_le_bytes)
displays signature
```
pub fn to_ne_bytes(self) -> [u8; 8]
```
which might be misleading: this function returns 4 bytes on 32-bit
systems.
With this commit applied rustdoc for `isize` and `usize` is this:
<img width="740" alt="2019-04-15_0020" src="https://user-images.githubusercontent.com/28969/56100765-9f69b380-5f14-11e9-974c-daa25edaa881.png">
bors [Wed, 8 May 2019 18:38:14 +0000 (18:38 +0000)]
Auto merge of #60402 - michaelwoerister:update-profiler-rt-build, r=alexcrichton
libprofiler_builtins: Set compilation flags more correctly for C code.
In particular, set `COMPILER_RT_HAS_FCNTL_LCK` and `COMPILER_RT_HAS_ATOMICS` as appropriate. This should get rid of the various runtime warnings when executing instrumented binaries.
The build script is using a heuristic here that hopefully is sufficient for the time being.
bors [Wed, 8 May 2019 08:26:48 +0000 (08:26 +0000)]
Auto merge of #60378 - froydnj:apple-target-modifications, r=michaelwoerister
conditionally modify darwin targets to macosx targets with versions
We need this behavior so that Rust LLVM IR objects match the target triple for Clang LLVM IR objects. This matching then convinces the linker that yes, you really can do cross-language LTO with objects from different compilers.
The newly-added tests seem to pass locally on x86_64-unknown-linux-gnu. I haven't done a full test run or tried the new compiler in an cross-language LTO setup yet.
bors [Tue, 7 May 2019 22:33:12 +0000 (22:33 +0000)]
Auto merge of #60586 - cramertj:await, r=oli-obk
Implement built-in await syntax
Adds support for .await under the existing async_await feature gate.
Moves macro-like await! syntax to the await_macro feature gate.
Removes support for `await` as a non-keyword under the `async_await`
feature.
This new syntax is not final, but is the consensus solution proposed by the lang team, as explained in https://boats.gitlab.io/blog/post/await-decision/