]> git.lizzy.rs Git - rust.git/log
rust.git
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 agoAdd self to mailmap.
jumbatm [Mon, 30 Dec 2019 03:59:23 +0000 (13:59 +1000)]
Add self to mailmap.

4 years agofix review comment
mark [Sun, 29 Dec 2019 20:19:05 +0000 (14:19 -0600)]
fix review comment

4 years agoGet rid of ErrorReportingCtx
mark [Sat, 21 Dec 2019 05:59:31 +0000 (23:59 -0600)]
Get rid of ErrorReportingCtx

4 years agoreview comments
Esteban Küber [Fri, 27 Dec 2019 23:45:39 +0000 (15:45 -0800)]
review comments

4 years agoclean up logic
Esteban Küber [Fri, 27 Dec 2019 12:15:48 +0000 (04:15 -0800)]
clean up logic

4 years agoreview comments
Esteban Küber [Thu, 26 Dec 2019 22:01:45 +0000 (14:01 -0800)]
review comments

4 years agoFormat and fix rebase
Esteban Küber [Thu, 26 Dec 2019 21:25:04 +0000 (13:25 -0800)]
Format and fix rebase

4 years agoAccount for existing type params when suggesting replacing `_` for a new one
Esteban Küber [Tue, 24 Dec 2019 23:12:01 +0000 (15:12 -0800)]
Account for existing type params when suggesting replacing `_` for a new one

4 years agoAccount for all item kinds when collecting and gateing `_` in item defs
Esteban Küber [Tue, 24 Dec 2019 21:18:09 +0000 (13:18 -0800)]
Account for all item kinds when collecting and gateing `_` in item defs

4 years agoSuggest type param when encountering `_` in fn defs
Esteban Küber [Mon, 23 Dec 2019 22:16:34 +0000 (14:16 -0800)]
Suggest type param when encountering `_` in fn defs

When encountering `_` type placeholder in fn arguments and return type,
suggest using generic type parameters.
Expand what counts as an inferable return type to slice, array and
tuples of `_`.

4 years agoAuto merge of #67631 - oli-obk:polymorphic_promotion, r=wesleywiser
bors [Mon, 30 Dec 2019 02:05:24 +0000 (02:05 +0000)]
Auto merge of #67631 - oli-obk:polymorphic_promotion, r=wesleywiser

Work around a resolve bug in const prop

r? @wesleywiser @anp

This isn't exposed right now, but further changes to rustc may start causing bugs without this.

4 years agoTypo fix
Peter Todd [Mon, 30 Dec 2019 01:50:01 +0000 (20:50 -0500)]
Typo fix

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 agoResolve long compile times when evaluating always valid constants
Wesley Wiser [Fri, 27 Dec 2019 19:33:22 +0000 (14:33 -0500)]
Resolve long compile times when evaluating always valid constants

This extends the existing logic which skips validating every integer or
floating point number type to also skip validating empty structs because
they are also trivially valid.

Fixes #67539

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 agoIntroduce librustc/middle/mod.rs
Camille GILLOT [Sun, 29 Dec 2019 10:57:30 +0000 (11:57 +0100)]
Introduce librustc/middle/mod.rs

4 years agoMove get_lib_features query in librustc_passes.
Camille GILLOT [Fri, 27 Dec 2019 17:52:36 +0000 (18:52 +0100)]
Move get_lib_features query in librustc_passes.

4 years agoMove lib_features.rs in librustc_passes.
Camille GILLOT [Fri, 27 Dec 2019 17:43:22 +0000 (18:43 +0100)]
Move lib_features.rs in librustc_passes.

4 years agotidy: Enforce formatting rather than just check it if `--bless` is specified
Vadim Petrochenkov [Sun, 29 Dec 2019 11:31:54 +0000 (14:31 +0300)]
tidy: Enforce formatting rather than just check it if `--bless` is specified

4 years agoMove diagnostic_items queries to librustc_passes.
Camille GILLOT [Thu, 26 Dec 2019 22:33:40 +0000 (23:33 +0100)]
Move diagnostic_items queries to librustc_passes.

4 years agoMove diagnostic_items.rs to librustc_passes.
Camille GILLOT [Thu, 26 Dec 2019 22:26:24 +0000 (23:26 +0100)]
Move diagnostic_items.rs to librustc_passes.

4 years agoMove reachable_set query in librustc_passes.
Camille GILLOT [Thu, 26 Dec 2019 22:24:36 +0000 (23:24 +0100)]
Move reachable_set query in librustc_passes.

4 years agoMove reachable.rs to librustc_passes.
Camille GILLOT [Thu, 26 Dec 2019 19:03:45 +0000 (20:03 +0100)]
Move reachable.rs to librustc_passes.

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 agoEnsure that we don't cause *new* hard errors if we suddenly can evaluate more constan...
Oliver Scherer [Sat, 28 Dec 2019 23:26:25 +0000 (00:26 +0100)]
Ensure that we don't cause *new* hard errors if we suddenly can evaluate more constants during const prop

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 agoAvoid copying some undef memory in MIR
Santiago Pastorino [Fri, 27 Dec 2019 18:50:56 +0000 (15:50 -0300)]
Avoid copying some undef memory in MIR

During MIR interpretation it may happen that a place containing
uninitialized bytes is copied. This would read the current
representation of these bytes and write it to the destination even
though they must, by definition, not matter to the execution.

This elides that representation change when no bytes are defined in such
a copy, saving some cpu cycles. In such a case, the memory of the target
allocation is not touched at all which also means that sometimes no
physical page backing the memory allocation of the representation needs
to be provided by the OS at all, reducing memory pressure on the system.

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 agoPrevent polymorphic const prop on assignments
Oliver Scherer [Thu, 26 Dec 2019 16:28:07 +0000 (17:28 +0100)]
Prevent polymorphic const prop on assignments

4 years agoWork around a resolve bug in const prop
Oliver Scherer [Thu, 26 Dec 2019 14:10:13 +0000 (15:10 +0100)]
Work around a resolve bug in const prop

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 `Instance::resolve()` incorrectly returning specialized instances
Wesley Wiser [Fri, 27 Dec 2019 16:44:36 +0000 (11:44 -0500)]
Fix `Instance::resolve()` incorrectly returning specialized instances

We only want to return specializations when `Reveal::All` is passed, not
when `Reveal::UserFacing` is. Resolving this fixes several issues with
the `ConstProp`, `SimplifyBranches`, and `Inline` MIR optimization
passes.

Fixes #66901

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 agoAvoid memory copy logic for zsts
Santiago Pastorino [Fri, 27 Dec 2019 11:56:52 +0000 (08:56 -0300)]
Avoid memory copy logic for zsts

Closes #67539

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.