105440 Commits

Author SHA1 Message Date
Dylan DPC
ae1e75bf4e
Rollup merge of #68212 - csmoe:temp, r=estebank
Suggest to shorten temporary lifetime during method call inside generator

Closes https://github.com/rust-lang/rust/issues/67376
![image](https://user-images.githubusercontent.com/35686186/72364752-f6b1e400-3731-11ea-8ec9-8297ba4c6c77.png)

r? @estebank
cc @tmandry @nikomatsakis
2020-01-15 22:49:26 +05:30
Dylan DPC
1b7b8cbed3
Rollup merge of #68123 - crlf0710:linked_list_cursor, r=Amanieu
Implement Cursor for linked lists. (RFC 2570).

cc. #58533 cc. @Gankra

r? @Amanieu
2020-01-15 22:49:24 +05:30
bors
6d0bb91bcb Auto merge of #68248 - JohnTitor:rollup-x0kml5f, r=JohnTitor
Rollup of 12 pull requests

Successful merges:

 - #67784 (Reset Formatter flags on exit from pad_integral)
 - #67914 (Don't run const propagation on items with inconsistent bounds)
 - #68141 (use winapi for non-stdlib Windows bindings)
 - #68211 (Add failing example for E0170 explanation)
 - #68219 (Untangle ZST validation from integer validation and generalize it to all zsts)
 - #68222 (Update the wasi-libc bundled with libstd)
 - #68226 (Avoid calling tcx.hir().get() on CRATE_HIR_ID)
 - #68227 (Update to a version of cmake with windows arm64 support)
 - #68229 (Update iovec to a version with no winapi dependency)
 - #68230 (Update libssh2-sys to a version that can build for aarch64-pc-windows…)
 - #68231 (Better support for cross compilation on Windows.)
 - #68233 (Update compiler_builtins with changes to fix 128 bit integer remainder for aarch64 windows.)

Failed merges:

r? @ghost
2020-01-15 13:00:43 +00:00
Yuki Okushi
d2840e6bf1
Rollup merge of #68233 - danielframpton:update-compiler-builtins, r=alexcrichton
Update compiler_builtins with changes to fix 128 bit integer remainder for aarch64 windows.

I have been investigating enabling panic=unwind for aarch64-pc-windows-msvc (see #65313) and building rustc and cargo hosted on aarch64-pc-windows-msvc.
2020-01-15 21:51:59 +09:00
Yuki Okushi
1859d57065
Rollup merge of #68231 - danielframpton:windows-crosscompile, r=alexcrichton
Better support for cross compilation on Windows.

I have been investigating enabling panic=unwind for aarch64-pc-windows-msvc (see #65313) and building rustc and cargo hosted on aarch64-pc-windows-msvc.

Without the libpath changes we were trying to link a mix of amd64 and arm64 binaries.

Without the cmake system name change, the llvm build was trying to run an arm64 build tool on the x86_64 build machine.

That said, I haven't tested all different combinations here and am very open to resolving this a different way.
2020-01-15 21:51:58 +09:00
Yuki Okushi
2c994f22d6
Rollup merge of #68230 - danielframpton:update-libssh2-sys, r=alexcrichton
Update libssh2-sys to a version that can build for aarch64-pc-windows…

I have been investigating enabling panic=unwind for aarch64-pc-windows-msvc (see #65313) and building rustc and cargo hosted on aarch64-pc-windows-msvc.
2020-01-15 21:51:57 +09:00
Yuki Okushi
cc07710196
Rollup merge of #68229 - danielframpton:update-iovec, r=alexcrichton
Update iovec to a version with no winapi dependency

I have been investigating enabling panic=unwind for aarch64-pc-windows-msvc (see #65313) and building rustc and cargo hosted on aarch64-pc-windows-msvc.
2020-01-15 21:51:55 +09:00
Yuki Okushi
58d348d3ab
Rollup merge of #68227 - danielframpton:update-cmake, r=alexcrichton
Update to a version of cmake with windows arm64 support

I have been investigating enabling panic=unwind for aarch64-pc-windows-msvc (see #65313) and building rustc and cargo hosted on aarch64-pc-windows-msvc.
2020-01-15 21:51:54 +09:00
Yuki Okushi
38ca7b707e
Rollup merge of #68226 - Aaron1011:fix/opaque-trace, r=matthewjasper
Avoid calling tcx.hir().get() on CRATE_HIR_ID

This was causing an ICE when enabling trace logging for an unrelated
module, since the arguments to `trace!` ended up getting evaluated
2020-01-15 21:51:52 +09:00
Yuki Okushi
eed625671a
Rollup merge of #68222 - alexcrichton:update-wasi-libc, r=kennytm
Update the wasi-libc bundled with libstd
2020-01-15 21:51:51 +09:00
Yuki Okushi
610ea80710
Rollup merge of #68219 - oli-obk:fix_miri, r=RalfJung,wesleywiser
Untangle ZST validation from integer validation and generalize it to all zsts

cc @RalfJung

r? @wesleywiser
2020-01-15 21:51:50 +09:00
Yuki Okushi
20c49fc797
Rollup merge of #68211 - GuillaumeGomez:add-failing-example-e0170, r=Dylan-DPC
Add failing example for E0170 explanation

r? @Dylan-DPC
2020-01-15 21:51:48 +09:00
Yuki Okushi
be1ecce01f
Rollup merge of #68141 - euclio:replace-bindings-with-winapi, r=alexcrichton
use winapi for non-stdlib Windows bindings
2020-01-15 21:51:45 +09:00
Yuki Okushi
89b065dbd2
Rollup merge of #67914 - Aaron1011:fix/const-prop-impossible, r=matthewjasper,oli-obk
Don't run const propagation on items with inconsistent bounds

Fixes #67696

Using `#![feature(trivial_bounds)]`, it's possible to write functions
with unsatisfiable 'where' clauses, making them uncallable. However, the
user can act as if these 'where' clauses are true inside the body of the
function, leading to code that would normally be impossible to write.

Since const propgation can run even without any user-written calls to a
function, we need to explcitly check for these uncallable functions.
2020-01-15 21:51:43 +09:00
Yuki Okushi
e800fe199c
Rollup merge of #67784 - Mark-Simulacrum:residual-pad-integral, r=dtolnay
Reset Formatter flags on exit from pad_integral

This fixes a bug where after calling pad_integral with appropriate flags, the
fill and alignment flags would be set to '0' and 'Right' and left as such even
after exiting pad_integral, which meant that future calls on the same Formatter
would get incorrect flags reported.

This is quite difficult to observe in practice, as almost all formatting
implementations in practice don't call `Display::fmt` directly, but rather use
`write!` or a similar macro, which means that they cannot observe the effects of
the wrong flags (as `write!` creates a fresh Formatter instance). However, we
include a test case.

A manual check leads me to believe this is the only case where we failed to reset the flags appropriately, but I could have missed something.
2020-01-15 21:51:42 +09:00
bors
c74353c7d2 Auto merge of #68221 - ehuss:update-cargo-rls, r=alexcrichton
Update cargo rls

## cargo

12 commits in 6e1ca924a67dd1ac89c33f294ef26b5c43b89168..ad3dbe10e1e654fb1f032a5dd9481d7cbaa00d65
2020-01-06 19:11:37 +0000 to 2020-01-13 21:37:15 +0000
- Add named config profiles. (rust-lang/cargo#7750)
- Make cargo-rustc crate-type-aware (rust-lang/cargo#7755)
- Rename `Kind` (rust-lang/cargo#7791)
- Update bash completion (rust-lang/cargo#7789)
- Add another curl spurious network error (rust-lang/cargo#7788)
- Some small tweaks around error in configuration (rust-lang/cargo#7783)
- Fix tests with `url` crate update (rust-lang/cargo#7787)
- Fix .gitignore of Cargo.lock in a subdirectory. (rust-lang/cargo#7779)
- Bump crates-io (rust-lang/cargo#7778)
- Migrate from the `failure` crate to `anyhow` (rust-lang/cargo#7776)
- Fix several needless_borrow clippy lints. (rust-lang/cargo#7771)
- Fix some links (rust-lang/cargo#7770)

## rls

2 commits in 7c0489c5ff4f5c594e65a3b22efd9ce373deab9b..b27e1173969639448cd2e486b1c5f0fcb1b3b17c
2020-01-04 20:15:37 +0100 to 2020-01-13 11:40:20 +0100
- Update Cargo (rust-lang-nursery/rls#1613)
- Rustup to rust-lang/rust#68024 (rust-lang-nursery/rls#1612)
2020-01-15 09:34:49 +00:00
Oliver Scherer
0e14b9ff26 Add tests 2020-01-15 10:30:26 +01:00
csmoe
4eb47ded54 wrap expr id into GeneratorInteriorTypeCause 2020-01-15 15:13:51 +08:00
Dylan DPC
6801cf436b
Update E0170.md 2020-01-15 11:52:21 +05:30
bors
632387f38d Auto merge of #66329 - ktrianta:mir-opt-unreachable-propagation, r=oli-obk
Add unreachable propagation mir optimization pass

@oli-obk suggested we create a MIR pass that optimizes away basic blocks that lead only to basic blocks with terminator kind **unreachable**. This is a first take on this, which we started with @gilescope at RustFest Impl Days.

The test currently fails when the compiled program runs (undefined behaviour). Is there a way to avoid running the compiled program?
2020-01-15 05:01:10 +00:00
bors
4b172cc73f Auto merge of #68118 - skinny121:eager_lit_eval, r=varkor
perf: Eagerly convert literals to consts

Previousely even literal constants were being converted to an `Unevaluted` constant for evaluation later. This seems unecessary as no more information is needed to be able to convert the literal to a mir constant.

Hopefully this will also minimise the performance impact of #67717, as far less constant evaluations are needed.
2020-01-15 00:56:53 +00:00
Aaron Hill
01dc44bfe0
Avoid calling tcx.hir().get() on CRATE_HIR_ID
This was causing an ICE when enabling trace logging for an unrelated
module, since the arguments to `trace!` ended up getting evaluated
2020-01-14 16:41:43 -05:00
Daniel Frampton
106fe0b13a Update to a version of compiler_builtins with changes for fixes remainder for aarch64 windows 2020-01-14 13:32:26 -08:00
Daniel Frampton
7d6271b76b Better support for cross compilation on Windows. 2020-01-14 12:15:13 -08:00
Daniel Frampton
9febc2bc7a Update to a version of cmake with windows arm64 support 2020-01-14 11:56:51 -08:00
Daniel Frampton
535fc9ce4c Update iovec to a version with no winapi dependency 2020-01-14 11:52:46 -08:00
Daniel Frampton
9f1452f699 Update libssh2-sys to a version that can build for aarch64-pc-windows-msvc 2020-01-14 11:26:03 -08:00
Alex Crichton
87504173b3 Update the wasi-libc bundled with libstd 2020-01-14 09:59:46 -08:00
Ben Lewis
583a4fc827 Fix normalizing 32bit symbol hash. 2020-01-15 06:59:26 +13:00
Eric Huss
55cb505257 Update rustfix in compiletest. 2020-01-14 09:50:55 -08:00
Eric Huss
6da85d6f99 Update cargo, rls 2020-01-14 09:47:04 -08:00
csmoe
5ad8b9e394 update async-await send/sync test 2020-01-15 00:45:08 +08:00
Oliver Scherer
6faad6dc7a Untangle ZST validation from integer validation and generalize it to all zsts 2020-01-14 17:18:14 +01:00
bors
8a87b945b2 Auto merge of #67711 - Amanieu:fix_unwind_leak, r=alexcrichton
Fix memory leak if C++ catches a Rust panic and discards it

If C++ catches a Rust panic using `catch (...)` and then chooses not to rethrow it, the `Box<dyn Any>` in the exception may be leaked. This PR fixes this by adding the necessary destructors to the exception object.

r? @Mark-Simulacrum
2020-01-14 15:29:43 +00:00
csmoe
b975601167 suggest to limit lifetime of temporary borrow with let 2020-01-14 21:22:19 +08:00
csmoe
148c1bca0f record generoator interior exprs in typecktable 2020-01-14 21:21:14 +08:00
Guillaume Gomez
5076a3efc7 Add failing example for E0170 explanation 2020-01-14 14:04:03 +01:00
Charles Lew
06b9a73cfa Update APIs according to RFC change suggestions. 2020-01-14 20:11:52 +08:00
bors
cb6122db3f Auto merge of #67076 - mbrubeck:condvar, r=dtolnay
Stabilize Condvar::wait_while and wait_timeout_while (previously wait_until, wait_timeout_until)

Closes #47960.
2020-01-14 10:34:43 +00:00
Ben Lewis
30dba97540 Normalize symbol hash in ui test for legacy symbol mangling, as it's dependent on the
number of bits within consts.
2020-01-14 20:41:14 +13:00
Konstantinos Triantafyllou
72710d6dc2 Add unreachable propagation mir optimization pass 2020-01-14 08:22:10 +01:00
bors
c06e4aca19 Auto merge of #68201 - JohnTitor:rollup-26e39gu, r=JohnTitor
Rollup of 10 pull requests

Successful merges:

 - #67854 (Use `report_in_external_macro` for internal lints)
 - #67989 (rustdoc: Don't allow `#![feature(...)]` on stable or beta)
 - #68036 (libterm: parse extended terminfo format)
 - #68127 (Clarify the relationship between `extended` and `tools` in `config.toml`)
 - #68143 (Forbid elided lifetimes within const generic parameter types)
 - #68150 (Document behavior of set_nonblocking on UnixListener)
 - #68166 (rustdoc: HTML escape arrows on help popup)
 - #68176 (Clean up err codes)
 - #68179 (Remove unneeded scope)
 - #68188 (Tweak assertion note in format check)

Failed merges:

r? @ghost
2020-01-14 07:13:31 +00:00
Yuki Okushi
b8c0e3129c
Rollup merge of #68188 - JohnTitor:tweak-assertion-note, r=Mark-Simulacrum
Tweak assertion note in format check

It's informative to tell the existence of `--bless` flag if we're running `tidy`.
2020-01-14 14:02:31 +09:00
Yuki Okushi
7d1cbc7f7c
Rollup merge of #68179 - JohnTitor:nll-scope, r=varkor
Remove unneeded scope

Now, we can remove this scope.
2020-01-14 14:02:29 +09:00
Yuki Okushi
d6d5b74fb2
Rollup merge of #68176 - GuillaumeGomez:clean-up-err-codes, r=Dylan-DPC
Clean up err codes

r? @Dylan-DPC
2020-01-14 14:02:28 +09:00
Yuki Okushi
076d6a0c9a
Rollup merge of #68166 - ollie27:rustdoc_help_escape, r=GuillaumeGomez
rustdoc: HTML escape arrows on help popup

r? @GuillaumeGomez
2020-01-14 14:02:26 +09:00
Yuki Okushi
725f88b09c
Rollup merge of #68150 - tillarnold:master, r=cramertj
Document behavior of set_nonblocking on UnixListener

The description on `set_nonblocking` in `UnixListener` was rather brief so I adapted it to be more like the documentation of  `set_nonblocking` in `TcpListener`.
2020-01-14 14:02:24 +09:00
Yuki Okushi
d7e599203c
Rollup merge of #68143 - skinny121:const-param-type-elided-lifetime, r=petrochenkov
Forbid elided lifetimes within const generic parameter types

Disallows `fn foo<const T: &u32>()`, the lifetime must be explicitly given, i.e. `fn foo<const T: &'static u32>()`.

Fixes #67883
2020-01-14 14:02:23 +09:00
Yuki Okushi
7da1dcc3e0
Rollup merge of #68127 - varkor:clarify-extended-option, r=alexcrichton
Clarify the relationship between `extended` and `tools` in `config.toml`

I.e. `tools` is only effective if `extended = true`. Alternatively, we could make `tools = []` by default and remove `extended` (although we'd want to list the possible options), but improving the description seems sufficient to solve the issue.

Fixes https://github.com/rust-lang/rust/issues/61194.
2020-01-14 14:02:21 +09:00
Yuki Okushi
974b69927b
Rollup merge of #68036 - euclio:libterm-ncurses6-fix, r=KodrAus
libterm: parse extended terminfo format

Fixes #45728.

Modifies libterm to parse the extended terminfo format introduced in ncurses 6.1. This fixes the lack of color in test output for users with newer ncurses versions.

The ideal fix for this would be to migrate libtest to use `termcolor` (https://github.com/rust-lang/rust/issues/60349), but that's blocked for the foreseeable future.
2020-01-14 14:02:20 +09:00