]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoRollup merge of #67687 - estebank:issue-67634, r=matthewjasper
Yuki Okushi [Mon, 30 Dec 2019 05:07:53 +0000 (14:07 +0900)]
Rollup merge of #67687 - estebank:issue-67634, r=matthewjasper

Do not ICE on lifetime error involving closures

Fix #67634.

4 years agoRollup merge of #67677 - petrochenkov:dupexp, r=Centril
Yuki Okushi [Mon, 30 Dec 2019 05:07:52 +0000 (14:07 +0900)]
Rollup merge of #67677 - petrochenkov:dupexp, r=Centril

resolve: Minor cleanup of duplicate macro reexports

Enabled by https://github.com/rust-lang/rust/pull/65785 which changed `duplicate_macro_exports` from a lint to a hard error.

4 years agoRollup merge of #67657 - jumbatm:cleanup-const-hack, r=oli-obk
Yuki Okushi [Mon, 30 Dec 2019 05:07:50 +0000 (14:07 +0900)]
Rollup merge of #67657 - jumbatm:cleanup-const-hack, r=oli-obk

Clean up const-hack PRs now that const if / match exist.

Closes #67627.

Cleans up these merged PRs tagged with `const-hack`:

- #63810
- #63786
- #61635
- #58044

reverting their contents to have the match or if expressions they originally contained.

r? @oli-obk

There's one more PR in those tagged with `const-hack` that originally wasn't merged (#65107). Reading the thread, it looks like it was originally closed because the `const-hack` for the checked arithmetic non-negligibly hurt performance, and because there was no way to manipulate the returned Option at compile time anyway (with neither const if nor const match). Would you like me to add these changes to the changes from this PR here too, now that we have the necessary features?

4 years agoRollup merge of #67622 - gilescope:async-keyword-doc, r=Centril
Yuki Okushi [Mon, 30 Dec 2019 05:07:49 +0000 (14:07 +0900)]
Rollup merge of #67622 - gilescope:async-keyword-doc, r=Centril

Some keyword documentation.

I thought about going into detail, but I'd much rather route them to the async book asap.

4 years agoRollup merge of #67564 - Mark-Simulacrum:iter-adapter-panic, r=LukasKalbertodt
Yuki Okushi [Mon, 30 Dec 2019 05:07:47 +0000 (14:07 +0900)]
Rollup merge of #67564 - Mark-Simulacrum:iter-adapter-panic, r=LukasKalbertodt

docs: Iterator adapters have unspecified results after a panic

Fixes #58170.

That issue also has rough consensus from 3 members of the library team for this being the behavior we would like to specify.

4 years agoRollup merge of #67287 - Centril:mismatch-range-improve-diag, r=estebank
Yuki Okushi [Mon, 30 Dec 2019 05:07:46 +0000 (14:07 +0900)]
Rollup merge of #67287 - Centril:mismatch-range-improve-diag, r=estebank

typeck: note other end-point when checking range pats

Fixes #57389, alternative to #67214 that should be less invasive to type checking logic.

r? @estebank

4 years agoRollup merge of #64273 - petrochenkov:stabattrmod, r=Centril
Yuki Okushi [Mon, 30 Dec 2019 05:07:44 +0000 (14:07 +0900)]
Rollup merge of #64273 - petrochenkov:stabattrmod, r=Centril

Stabilize attribute macros on inline modules

While still gating non-inline modules in proc macro input.

Split from https://github.com/rust-lang/rust/pull/63931
cc https://github.com/rust-lang/rust/issues/54727

4 years agonote other end-point when typeck range pats
Mazdak Farrokhzad [Fri, 13 Dec 2019 22:33:58 +0000 (23:33 +0100)]
note other end-point when typeck range pats

4 years agoAuto merge of #66942 - cjgillot:hirene-ty, r=Zoxc
bors [Sun, 29 Dec 2019 22:51:02 +0000 (22:51 +0000)]
Auto merge of #66942 - cjgillot:hirene-ty, r=Zoxc

Allocate HIR on an arena 3/4 -- Ty

This is the third PR in the series started by #66931 and #66936

Once again, commits don't really make sense on their own.
They are mostly split by type of compile error.

The additional diff is here: https://github.com/cjgillot/rust/compare/hirene-expr...hirene-ty

4 years agoAuto merge of #67112 - Centril:expr-polish, r=estebank
bors [Sun, 29 Dec 2019 19:30:53 +0000 (19:30 +0000)]
Auto merge of #67112 - Centril:expr-polish, r=estebank

Refactor expression parsing thoroughly

Based on https://github.com/rust-lang/rust/pull/66994 together with which this has refactored basically the entirety of `expr.rs`.

r? @estebank

4 years agoAuto merge of #67661 - JohnTitor:clippy-cargo, r=oli-obk
bors [Sun, 29 Dec 2019 16:12:57 +0000 (16:12 +0000)]
Auto merge of #67661 - JohnTitor:clippy-cargo, r=oli-obk

Update Clippy and cargo

includes latest rustup and resolves dependency conflicts with cargo
Closes #67541

r? @oli-obk @Manishearth

4 years agoAuto merge of #67694 - Dylan-DPC:rollup-wxxm9yu, r=Dylan-DPC
bors [Sun, 29 Dec 2019 09:33:04 +0000 (09:33 +0000)]
Auto merge of #67694 - Dylan-DPC:rollup-wxxm9yu, r=Dylan-DPC

Rollup of 3 pull requests

Successful merges:

 - #67482 (Fix outdated comment)
 - #67673 (Update .mailmap)
 - #67679 (Change "be returning" to "return")

Failed merges:

r? @ghost

4 years agoSome keyword documentation.
Giles Cope [Wed, 25 Dec 2019 22:59:26 +0000 (22:59 +0000)]
Some keyword documentation.

4 years agoUpdate Cargo.lock
Yuki Okushi [Fri, 27 Dec 2019 14:40:18 +0000 (23:40 +0900)]
Update Cargo.lock

4 years agoUpdate cargo
Yuki Okushi [Fri, 27 Dec 2019 14:40:09 +0000 (23:40 +0900)]
Update cargo

4 years agoUpdate Clippy
Yuki Okushi [Fri, 27 Dec 2019 14:40:01 +0000 (23:40 +0900)]
Update Clippy

4 years agoRollup merge of #67679 - kraai:change-be-returning-to-return, r=Dylan-DPC
Dylan DPC [Sun, 29 Dec 2019 07:39:59 +0000 (13:09 +0530)]
Rollup merge of #67679 - kraai:change-be-returning-to-return, r=Dylan-DPC

Change "be returning" to "return"

4 years agoRollup merge of #67673 - JohnTitor:mailmap, r=Dylan-DPC
Dylan DPC [Sun, 29 Dec 2019 07:39:58 +0000 (13:09 +0530)]
Rollup merge of #67673 - JohnTitor:mailmap, r=Dylan-DPC

Update .mailmap

r? @Mark-Simulacrum

4 years agoRollup merge of #67482 - ldm0:master, r=petrochenkov
Dylan DPC [Sun, 29 Dec 2019 07:39:56 +0000 (13:09 +0530)]
Rollup merge of #67482 - ldm0:master, r=petrochenkov

Fix outdated comment

Logics in `libsyntax/ext/expand.rs:MacroExpander::expand()` have been moved to `libsyntax_expand/expand.rs:MacroExpander::fully_expand_fragment()`
This pull request fixs the dangling file path.

#### Old

https://github.com/rust-lang/rust/blob/35176867f62f76b9bc27267878f2d74d9c776221/src/libsyntax/ext/expand.rs#L285-L301

#### New

https://github.com/rust-lang/rust/blob/9ff30a7810c586819a78188c173a7b74adbb9730/src/libsyntax_expand/expand.rs#L421-L439

https://github.com/rust-lang/rust/blob/9ff30a7810c586819a78188c173a7b74adbb9730/src/libsyntax_expand/base.rs#L224-L234

4 years agoAuto merge of #67614 - Mark-Simulacrum:global-callbacks, r=Zoxc
bors [Sun, 29 Dec 2019 04:30:56 +0000 (04:30 +0000)]
Auto merge of #67614 - Mark-Simulacrum:global-callbacks, r=Zoxc

Set callbacks globally

This sets the callbacks from syntax and rustc_errors just once, utilizing static (rather than thread-local) storage.

4 years agoAuto merge of #67334 - estebank:ignore-triple, r=nikomatsakis
bors [Sat, 28 Dec 2019 23:02:09 +0000 (23:02 +0000)]
Auto merge of #67334 - estebank:ignore-triple, r=nikomatsakis

Teach `compiletest` to ignore platform triples

The UI tests are written assuming `--remap-path-prefix` is *not used* (`remap-debuginfo` in `config.toml`). The consequence is that the error messages may include paths and snippets into the standard library. When `remap-debuginfo` is enabled, these messages change in format and structure because `rustc` will not show paths and snippets into the standard library.

This normally isn't a problem for the "main" platforms (linux/macos/windows), because the CI infrastructure is set up so that the tests run without `remap-debuginfo`, but the `dist` artifacts are built separately with `remap-debuginfo` enabled. However, some of the lower-tier platforms perform both tests and distribution in a single step with `remap-debuginfo` enabled. This also affects developers and distributors who use `remap-debuginfo`.

To sidestep this problem, we add a way to ignore tests in specific platform triples, and update the overly broad `ignore-x86` rule in affected tests.

Address #46948, #54546, #53081.

4 years agoDo not ICE on lifetime error involving closures
Esteban Küber [Sat, 28 Dec 2019 21:51:29 +0000 (13:51 -0800)]
Do not ICE on lifetime error involving closures

4 years agoIgnore i586-unknown-linux-gnu and i586-unknown-musl in tests
Esteban Küber [Sun, 15 Dec 2019 20:08:06 +0000 (12:08 -0800)]
Ignore i586-unknown-linux-gnu and i586-unknown-musl in tests

4 years agoAuto merge of #67151 - petrochenkov:docomm, r=estebank
bors [Sat, 28 Dec 2019 19:23:36 +0000 (19:23 +0000)]
Auto merge of #67151 - petrochenkov:docomm, r=estebank

doc comments: Less attribute mimicking

Make sure doc comments are not converted into intermediate meta-items, or not mixed with `doc(inline)` or something like that.

Follow-up to https://github.com/rust-lang/rust/pull/65750.

4 years agoAuto merge of #67459 - ssomers:#67438, r=RalfJung
bors [Sat, 28 Dec 2019 16:04:40 +0000 (16:04 +0000)]
Auto merge of #67459 - ssomers:#67438, r=RalfJung

prune ill-conceived BTreeMap iter_mut assertion and test its mutability

Proposal to deal with #67438 (and I'm more sure now that this is the right thing to do).
Passes testing with miri.

4 years agoChange "be returning" to "return"
Matthew Kraai [Sat, 28 Dec 2019 15:05:44 +0000 (07:05 -0800)]
Change "be returning" to "return"

4 years agoresolve: Minor cleanup of duplicate macro reexports
Vadim Petrochenkov [Sat, 28 Dec 2019 14:37:22 +0000 (17:37 +0300)]
resolve: Minor cleanup of duplicate macro reexports

4 years agoAuto merge of #67675 - RalfJung:miri, r=RalfJung
bors [Sat, 28 Dec 2019 12:37:30 +0000 (12:37 +0000)]
Auto merge of #67675 - RalfJung:miri, r=RalfJung

update miri

4 years agoupdate miri
Ralf Jung [Sat, 28 Dec 2019 10:20:25 +0000 (11:20 +0100)]
update miri

4 years agodoc comments: Less attribute mimicking
Vadim Petrochenkov [Sat, 7 Dec 2019 18:28:29 +0000 (21:28 +0300)]
doc comments: Less attribute mimicking

4 years agoAuto merge of #67605 - lzutao:msdn-links, r=Mark-Simulacrum
bors [Sat, 28 Dec 2019 09:19:26 +0000 (09:19 +0000)]
Auto merge of #67605 - lzutao:msdn-links, r=Mark-Simulacrum

tidy: change msdn links to newer locations

see accouncement at https://docs.microsoft.com/welcome-to-docs
The script that I used: https://gist.github.com/lzutao/1449c9210ad91899841d62e0058d2caa

4 years agoStabilize attribute macros on inline modules
Vadim Petrochenkov [Sat, 7 Sep 2019 22:42:12 +0000 (01:42 +0300)]
Stabilize attribute macros on inline modules

4 years agoUpdate .mailmap
Yuki Okushi [Sat, 28 Dec 2019 07:51:35 +0000 (16:51 +0900)]
Update .mailmap

4 years agoAuto merge of #67598 - jumbatm:issue67557_simd_shuffle, r=oli-obk
bors [Sat, 28 Dec 2019 06:02:45 +0000 (06:02 +0000)]
Auto merge of #67598 - jumbatm:issue67557_simd_shuffle, r=oli-obk

Fix ICE / miscompilation when inlining simd shuffle intrinsic in MIR.

Closes #67557.

r? @oli-obk

4 years agoTeach `compiletest` to ignore platform triples
Esteban Küber [Sun, 15 Dec 2019 19:32:59 +0000 (11:32 -0800)]
Teach `compiletest` to ignore platform triples

4 years agoAuto merge of #67670 - oli-obk:rollup-2dp08sd, r=oli-obk
bors [Sat, 28 Dec 2019 00:18:59 +0000 (00:18 +0000)]
Auto merge of #67670 - oli-obk:rollup-2dp08sd, r=oli-obk

Rollup of 15 pull requests

Successful merges:

 - #65244 (add IntoFuture trait and support for await)
 - #67576 (reuse `capacity` variable in slice::repeat)
 - #67588 (Use NonNull in slice::Iter and slice::IterMut.)
 - #67594 (Update libc to 0.2.66)
 - #67602 (Use issue = "none" instead of "0" in intrinsics)
 - #67604 (Add Scalar::to_(u|i)16 methods)
 - #67617 (Remove `compiler_builtins_lib` documentation)
 - #67621 (Use the correct type for static qualifs)
 - #67629 (Remove redundant link texts)
 - #67632 (Convert collapsed to shortcut reference links)
 - #67633 (Update .mailmap)
 - #67635 (Document safety of Path casting)
 - #67654 (Add regression test for old NLL ICE)
 - #67659 (Stabilize the `matches!` macro)
 - #67664 (Fix some mailmap entries)

Failed merges:

r? @ghost

4 years agoRollup merge of #67664 - Manishearth:mailmapfixes, r=Mark-Simulacrum
Oliver Scherer [Fri, 27 Dec 2019 23:36:18 +0000 (00:36 +0100)]
Rollup merge of #67664 - Manishearth:mailmapfixes, r=Mark-Simulacrum

Fix some mailmap entries

r? @pietroalbini

4 years agoRollup merge of #67659 - SimonSapin:matches, r=rkruppe
Oliver Scherer [Fri, 27 Dec 2019 23:36:17 +0000 (00:36 +0100)]
Rollup merge of #67659 - SimonSapin:matches, r=rkruppe

Stabilize the `matches!` macro

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

FCP: https://github.com/rust-lang/rust/issues/65721#issuecomment-569118119

4 years agoRollup merge of #67654 - rossmacarthur:fix-51770-add-regression-test, r=Centril
Oliver Scherer [Fri, 27 Dec 2019 23:36:16 +0000 (00:36 +0100)]
Rollup merge of #67654 - rossmacarthur:fix-51770-add-regression-test, r=Centril

Add regression test for old NLL ICE

This fails on nightly-2018-06-24.

Resolves #51770

4 years agoRollup merge of #67635 - Mark-Simulacrum:path-doc-unsafe, r=dtolnay
Oliver Scherer [Fri, 27 Dec 2019 23:36:14 +0000 (00:36 +0100)]
Rollup merge of #67635 - Mark-Simulacrum:path-doc-unsafe, r=dtolnay

Document safety of Path casting

I would personally feel more comfortable making the relevant (internal anyway) types repr(transparent) and then documenting that we can make these casts because of that, but I believe this is a more minimal PR, so posting it first.

Resolves #45910.

4 years agoRollup merge of #67633 - christianpoveda:patch-1, r=Mark-Simulacrum
Oliver Scherer [Fri, 27 Dec 2019 23:36:13 +0000 (00:36 +0100)]
Rollup merge of #67633 - christianpoveda:patch-1, r=Mark-Simulacrum

Update .mailmap

4 years agoRollup merge of #67632 - kraai:remove-collapsed-reference-links, r=steveklabnik
Oliver Scherer [Fri, 27 Dec 2019 23:36:11 +0000 (00:36 +0100)]
Rollup merge of #67632 - kraai:remove-collapsed-reference-links, r=steveklabnik

Convert collapsed to shortcut reference links

4 years agoRollup merge of #67629 - kraai:remove-redundant-link-texts, r=steveklabnik
Oliver Scherer [Fri, 27 Dec 2019 23:36:09 +0000 (00:36 +0100)]
Rollup merge of #67629 - kraai:remove-redundant-link-texts, r=steveklabnik

Remove redundant link texts

Most of these links are followed by a parenthesized expression.  I think that the redundant link texts were added to prevent interpretation as an inline link.  This is unnecessary since the closing square bracket and opening parenthesis are separated by whitespace.

4 years agoRollup merge of #67621 - matthewjasper:correct-static-type, r=oli-obk
Oliver Scherer [Fri, 27 Dec 2019 23:36:08 +0000 (00:36 +0100)]
Rollup merge of #67621 - matthewjasper:correct-static-type, r=oli-obk

Use the correct type for static qualifs

Closes #67609

4 years agoRollup merge of #67617 - kraai:remove-compiler_builtins_lib-docs, r=Dylan-DPC
Oliver Scherer [Fri, 27 Dec 2019 23:36:07 +0000 (00:36 +0100)]
Rollup merge of #67617 - kraai:remove-compiler_builtins_lib-docs, r=Dylan-DPC

Remove `compiler_builtins_lib` documentation

Fixes #67593

4 years agoRollup merge of #67604 - christianpoveda:scalar_to_(u|i)64, r=RalfJung
Oliver Scherer [Fri, 27 Dec 2019 23:36:05 +0000 (00:36 +0100)]
Rollup merge of #67604 - christianpoveda:scalar_to_(u|i)64, r=RalfJung

Add Scalar::to_(u|i)16 methods

r? @RalfJung

4 years agoRollup merge of #67602 - xfix:use-issue-none-instead-of-0-in-intrinsics, r=Centril
Oliver Scherer [Fri, 27 Dec 2019 23:36:04 +0000 (00:36 +0100)]
Rollup merge of #67602 - xfix:use-issue-none-instead-of-0-in-intrinsics, r=Centril

Use issue = "none" instead of "0" in intrinsics

`issue = "0"` was incorrectly used in https://github.com/rust-lang/rust/commit/9ee16e14c51668309f446636e8960b7fbbac066d, the project is moving away from issue 0

4 years agoRollup merge of #67594 - oxalica:update-libc, r=Dylan-DPC
Oliver Scherer [Fri, 27 Dec 2019 23:36:02 +0000 (00:36 +0100)]
Rollup merge of #67594 - oxalica:update-libc, r=Dylan-DPC

Update libc to 0.2.66

cc @gnzlbg @alexcrichton

4 years agoRollup merge of #67588 - Kixunil:nonnull-slice-iter, r=rkruppe
Oliver Scherer [Fri, 27 Dec 2019 23:36:01 +0000 (00:36 +0100)]
Rollup merge of #67588 - Kixunil:nonnull-slice-iter, r=rkruppe

Use NonNull in slice::Iter and slice::IterMut.

`ptr` of `slice::Iter` and `slice::IterMut` can never be null, but this
fact wasn't exploited for layout optimizations. By changing `ptr` from
`*<mutability> T` to `NonNull<T>`, the compiler can now optimize layout
of `Option<Iter<'a, T>>`.

Closes #67228

4 years agoRollup merge of #67576 - king6cong:slice_repeat, r=Dylan-DPC
Oliver Scherer [Fri, 27 Dec 2019 23:35:59 +0000 (00:35 +0100)]
Rollup merge of #67576 - king6cong:slice_repeat, r=Dylan-DPC

reuse `capacity` variable in slice::repeat

None

4 years agoRollup merge of #65244 - seanmonstar:into-future, r=seanmonstar
Oliver Scherer [Fri, 27 Dec 2019 23:35:58 +0000 (00:35 +0100)]
Rollup merge of #65244 - seanmonstar:into-future, r=seanmonstar

add IntoFuture trait and support for await

The [async-await RFC](https://rust-lang.github.io/rfcs/2394-async_await.html#the-await-compiler-built-in) mentions being able to `await` anything implementing `IntoFuture`. Somewhere along the way, it was left out.

4 years agocore: add IntoFuture trait and support for await
Sean McArthur [Thu, 26 Dec 2019 20:57:09 +0000 (12:57 -0800)]
core: add IntoFuture trait and support for await

4 years agoAuto merge of #67035 - Goirad:implement-ipadd-padding, r=dtolnay
bors [Fri, 27 Dec 2019 18:40:50 +0000 (18:40 +0000)]
Auto merge of #67035 - Goirad:implement-ipadd-padding, r=dtolnay

Implement padding for IpAddr without heap alloc

Implements padding for `IpAddr`s without heap allocations.
This fixes issue #66810 .

cc @jethrogb @mzohreva

4 years agoAddress review.
Camille GILLOT [Thu, 26 Dec 2019 16:36:54 +0000 (17:36 +0100)]
Address review.

4 years agoFallout in other crates.
Camille GILLOT [Sun, 1 Dec 2019 15:08:58 +0000 (16:08 +0100)]
Fallout in other crates.

4 years agoLowering for hir::Ty.
Camille GILLOT [Sun, 1 Dec 2019 10:22:58 +0000 (11:22 +0100)]
Lowering for hir::Ty.

4 years agoVisit for hir::Ty.
Camille GILLOT [Sat, 30 Nov 2019 23:17:43 +0000 (00:17 +0100)]
Visit for hir::Ty.

4 years agoSyntax for hir::Ty.
Camille GILLOT [Sat, 30 Nov 2019 16:46:46 +0000 (17:46 +0100)]
Syntax for hir::Ty.

4 years agoUse Arena inside hir::TraitMethod.
Camille GILLOT [Sat, 30 Nov 2019 14:28:32 +0000 (15:28 +0100)]
Use Arena inside hir::TraitMethod.

4 years agoUse Arena inside hir::FnSig.
Camille GILLOT [Sat, 30 Nov 2019 14:20:35 +0000 (15:20 +0100)]
Use Arena inside hir::FnSig.

4 years agoFix whitequark's entry in the mailmap
Manish Goregaokar [Fri, 27 Dec 2019 17:51:34 +0000 (09:51 -0800)]
Fix whitequark's entry in the mailmap

4 years agoFix Nika's entry in the mailmap
Manish Goregaokar [Fri, 27 Dec 2019 17:52:49 +0000 (09:52 -0800)]
Fix Nika's entry in the mailmap

4 years agoFix my entry in the mailmap
Manish Goregaokar [Fri, 27 Dec 2019 17:39:21 +0000 (09:39 -0800)]
Fix my entry in the mailmap

4 years agoClean up const-hack from #58044
jumbatm [Fri, 27 Dec 2019 10:29:39 +0000 (20:29 +1000)]
Clean up const-hack from #58044

4 years agoClean up const-hack from #61635
jumbatm [Fri, 27 Dec 2019 10:17:17 +0000 (20:17 +1000)]
Clean up const-hack from #61635

4 years agoClean up const-hack from #63786
jumbatm [Fri, 27 Dec 2019 10:09:07 +0000 (20:09 +1000)]
Clean up const-hack from #63786

4 years agoClean up const-hack from #63810
jumbatm [Fri, 27 Dec 2019 01:59:55 +0000 (11:59 +1000)]
Clean up const-hack from #63810

4 years agoStabilize the `matches!` macro
Simon Sapin [Fri, 27 Dec 2019 13:07:16 +0000 (14:07 +0100)]
Stabilize the `matches!` macro

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

FCP: https://github.com/rust-lang/rust/issues/65721#issuecomment-569118119

4 years agoAdd regression test for old NLL ICE
Ross MacArthur [Fri, 27 Dec 2019 11:36:41 +0000 (13:36 +0200)]
Add regression test for old NLL ICE

4 years agoAuto merge of #67437 - matthew-healy:skip-llvm-rebuild, r=Mark-Simulacrum
bors [Fri, 27 Dec 2019 10:58:57 +0000 (10:58 +0000)]
Auto merge of #67437 - matthew-healy:skip-llvm-rebuild, r=Mark-Simulacrum

Add LLVM `skip-rebuild` option to `x.py`

This PR reimplements parts of @Walther's work from #65848, and closes #65612.

I decided not to implement the [arguments to override this setting](https://github.com/rust-lang/rust/issues/65612#issuecomment-544247546) in this PR. If there's strong feeling that this change shouldn't be merged without the overrides then I'm happy to close this until I've had a chance to add them in. Otherwise I'll aim to submit a second PR with those this weekend.

I'd have liked to have tested the change in `native.rs`, but there didn't seem to be any existing test infrastructure. I ran this a few times manually and it _worked on my machine_ though... 😬

4 years agoAuto merge of #67192 - oli-obk:const_zst_addr, r=RalfJung,varkor
bors [Fri, 27 Dec 2019 07:38:52 +0000 (07:38 +0000)]
Auto merge of #67192 - oli-obk:const_zst_addr, r=RalfJung,varkor

Various const eval and pattern matching ICE fixes

r? @RalfJung
cc @spastorino

This PR does not change existing behaviour anymore and just fixes a bunch of ICEs reachable from user code (sometimes even on stable via obscure union transmutes).

4 years agoAuto merge of #66936 - cjgillot:hirene-expr, r=Zoxc
bors [Fri, 27 Dec 2019 01:40:41 +0000 (01:40 +0000)]
Auto merge of #66936 - cjgillot:hirene-expr, r=Zoxc

Allocate HIR on an arena 2/4 -- Expr & Pat

This is the second PR in the series started by #66931

This time, commits don't really make sense on their own.
They are mostly split by type of compile error.

The additional diff is here: https://github.com/cjgillot/rust/compare/hirene-preamble...hirene-expr

4 years agoMove arena_vec inside lowering.
Camille GILLOT [Tue, 24 Dec 2019 17:57:28 +0000 (18:57 +0100)]
Move arena_vec inside lowering.

4 years agoRemove some type information.
Camille GILLOT [Tue, 3 Dec 2019 21:54:44 +0000 (22:54 +0100)]
Remove some type information.

4 years agoFewer calls to arena.alloc.
Camille GILLOT [Sun, 1 Dec 2019 20:10:43 +0000 (21:10 +0100)]
Fewer calls to arena.alloc.

4 years agoFallout in other crates.
Camille GILLOT [Sat, 30 Nov 2019 14:08:22 +0000 (15:08 +0100)]
Fallout in other crates.

4 years agoLowering for hir::Expr.
Camille GILLOT [Fri, 29 Nov 2019 18:01:31 +0000 (19:01 +0100)]
Lowering for hir::Expr.

4 years agoVisit for hir::Expr.
Camille GILLOT [Fri, 29 Nov 2019 13:08:03 +0000 (14:08 +0100)]
Visit for hir::Expr.

4 years agoSyntax for hir::Expr.
Camille GILLOT [Fri, 29 Nov 2019 12:43:03 +0000 (13:43 +0100)]
Syntax for hir::Expr.

4 years agoSkip LLVM rebuild when skip-rebuild is true
Matthew Healy [Thu, 19 Dec 2019 19:42:01 +0000 (20:42 +0100)]
Skip LLVM rebuild when skip-rebuild is true

4 years agoParse llvm_skip_rebuild into Config
Matthew Healy [Thu, 19 Dec 2019 18:55:42 +0000 (19:55 +0100)]
Parse llvm_skip_rebuild into Config

4 years agoDocument LLVM skip-rebuild config.toml option
Matthew Healy [Thu, 19 Dec 2019 18:46:19 +0000 (19:46 +0100)]
Document LLVM skip-rebuild config.toml option

4 years agoMake ui test bitwidth independent
Oliver Scherer [Tue, 24 Dec 2019 13:31:36 +0000 (14:31 +0100)]
Make ui test bitwidth independent

4 years agoFix rebase fallout
Oliver Scherer [Mon, 23 Dec 2019 16:13:50 +0000 (17:13 +0100)]
Fix rebase fallout

4 years agoUse the targetted const eval functions
Oliver Scherer [Mon, 23 Dec 2019 16:13:25 +0000 (17:13 +0100)]
Use the targetted const eval functions

4 years agoReintroduce the recursion comment
Oliver Scherer [Sun, 22 Dec 2019 20:31:24 +0000 (21:31 +0100)]
Reintroduce the recursion comment

4 years agoDocumentation nit
Oliver Scherer [Sun, 22 Dec 2019 20:28:25 +0000 (21:28 +0100)]
Documentation nit

4 years agoAdd a `const_eval` helper to `InterpCx`
Oliver Scherer [Sun, 22 Dec 2019 19:56:01 +0000 (20:56 +0100)]
Add a `const_eval` helper to `InterpCx`

4 years agoEarly abort instead of building up zero sized values
Oliver Scherer [Sun, 22 Dec 2019 19:39:35 +0000 (20:39 +0100)]
Early abort instead of building up zero sized values

4 years agoExplain why `const_eval` is ok here
Oliver Scherer [Sun, 22 Dec 2019 12:30:47 +0000 (13:30 +0100)]
Explain why `const_eval` is ok here

4 years agoTypo
Oliver Scherer [Sun, 22 Dec 2019 12:13:08 +0000 (13:13 +0100)]
Typo

4 years agoRemove unintended noisy log statement
Oliver Scherer [Sun, 22 Dec 2019 12:10:56 +0000 (13:10 +0100)]
Remove unintended noisy log statement

4 years agoExplain the currently necessary existance of `TransmuteSizeDiff`
Oliver Scherer [Sun, 22 Dec 2019 12:06:50 +0000 (13:06 +0100)]
Explain the currently necessary existance of `TransmuteSizeDiff`

4 years agoExplain what we are doing with parameter environments for statics
Oliver Scherer [Sun, 22 Dec 2019 11:59:15 +0000 (12:59 +0100)]
Explain what we are doing with parameter environments for statics

4 years agoComments should start capitalized and end in a period
Oliver Scherer [Sun, 22 Dec 2019 11:55:31 +0000 (12:55 +0100)]
Comments should start capitalized and end in a period

4 years agoExplain ParamEnv::reveal_all usage
Oliver Scherer [Sun, 22 Dec 2019 11:54:48 +0000 (12:54 +0100)]
Explain ParamEnv::reveal_all usage

4 years agoAdd regression test for ZST statics being allowed to "read" from themselves
Oliver Scherer [Fri, 20 Dec 2019 11:37:05 +0000 (12:37 +0100)]
Add regression test for ZST statics being allowed to "read" from themselves

4 years agoImmediately evaluate and validate constants when we want them as operands
Oliver Scherer [Fri, 20 Dec 2019 11:31:52 +0000 (12:31 +0100)]
Immediately evaluate and validate constants when we want them as operands

4 years agoInterning even happens when validation of a constant fails
Oliver Scherer [Sat, 14 Dec 2019 11:15:37 +0000 (12:15 +0100)]
Interning even happens when validation of a constant fails

4 years agoPrevent an ICE on invalid transmutes
Oliver Scherer [Fri, 13 Dec 2019 23:19:24 +0000 (00:19 +0100)]
Prevent an ICE on invalid transmutes