]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoOnly install rustc-dev by default on nightly
Josh Stone [Mon, 7 Oct 2019 16:31:51 +0000 (09:31 -0700)]
Only install rustc-dev by default on nightly

4 years agoadd rustc-dev to tools/build-manifest
Josh Stone [Thu, 3 Oct 2019 18:40:39 +0000 (11:40 -0700)]
add rustc-dev to tools/build-manifest

4 years agoadd dist::RustcDev for unstable compiler libraries
Josh Stone [Thu, 3 Oct 2019 17:57:19 +0000 (10:57 -0700)]
add dist::RustcDev for unstable compiler libraries

4 years agoUse builder.compiler_for() to find the libstd stamp
Josh Stone [Fri, 27 Sep 2019 19:31:00 +0000 (12:31 -0700)]
Use builder.compiler_for() to find the libstd stamp

4 years ago[WIP] minimize the rust-std component
Josh Stone [Thu, 26 Sep 2019 21:44:08 +0000 (14:44 -0700)]
[WIP] minimize the rust-std component

4 years agoAuto merge of #64780 - choller:master, r=michaelwoerister
bors [Mon, 7 Oct 2019 13:23:00 +0000 (13:23 +0000)]
Auto merge of #64780 - choller:master, r=michaelwoerister

Only add sanitizer runtimes when linking an executable (#64629).

This change modifies the code to only add sanitizer runtimes if we are linking an executable, as those runtimes should never be part of libraries. I successfully compiled `mozilla-central` with ASan using this patch.

4 years agoAuto merge of #65178 - Centril:rollup-ep1zztj, r=Centril
bors [Mon, 7 Oct 2019 09:21:30 +0000 (09:21 +0000)]
Auto merge of #65178 - Centril:rollup-ep1zztj, r=Centril

Rollup of 4 pull requests

Successful merges:

 - #63948 (Add feature gate for raw_dylib.)
 - #65137 (remove event that causes panics in measureme tools)
 - #65164 (Add long error explanation for E0566)
 - #65173 (Update reference)

Failed merges:

r? @ghost

4 years agoRollup merge of #65173 - tmandry:reffy-ref, r=tmandry
Mazdak Farrokhzad [Mon, 7 Oct 2019 08:36:49 +0000 (10:36 +0200)]
Rollup merge of #65173 - tmandry:reffy-ref, r=tmandry

Update reference

- Add macros in extern blocks and new proc-macro support.
- Update for "modern" `meta` matcher.
- Update await desugaring after rust-lang/rust#64292

4 years agoRollup merge of #65164 - GuillaumeGomez:long-err-explanation-E0566, r=estebank
Mazdak Farrokhzad [Mon, 7 Oct 2019 08:36:48 +0000 (10:36 +0200)]
Rollup merge of #65164 - GuillaumeGomez:long-err-explanation-E0566, r=estebank

Add long error explanation for E0566

Part of #61137.

4 years agoRollup merge of #65137 - andjo403:selfProfiling_fix, r=michaelwoerister
Mazdak Farrokhzad [Mon, 7 Oct 2019 08:36:46 +0000 (10:36 +0200)]
Rollup merge of #65137 - andjo403:selfProfiling_fix, r=michaelwoerister

remove event that causes panics in measureme tools

the measureme tools summarize and crox do not alow a event to go out of scope of the parent event

codegen_and_optimize_crate ends after the codegen_crate event

r? @wesleywiser
cc @michaelwoerister @Mark-Simulacrum

4 years agoRollup merge of #63948 - crlf0710:path_to_raw_dylib, r=Centril
Mazdak Farrokhzad [Mon, 7 Oct 2019 08:36:45 +0000 (10:36 +0200)]
Rollup merge of #63948 - crlf0710:path_to_raw_dylib, r=Centril

Add feature gate for raw_dylib.

This PR adds the feature gate for RFC 2627 (https://github.com/rust-lang/rust/issues/58713). It doesn't contain the actual functionality.
Add I'm not sure whether i did it correctly, since this is the first time i did this.

r? @Centril

4 years agoFix compilation error after rebase.
Charles Lew [Sun, 6 Oct 2019 22:52:35 +0000 (06:52 +0800)]
Fix compilation error after rebase.

4 years agoAuto merge of #64739 - guanqun:remove-as-str, r=estebank
bors [Mon, 7 Oct 2019 05:35:17 +0000 (05:35 +0000)]
Auto merge of #64739 - guanqun:remove-as-str, r=estebank

Remove as_str if the type is already &str

Fix https://github.com/rust-lang/rust/issues/62642

r? @estebank

do you think the suggestion tip is good enough?

4 years agoAdd more tests, fix span issue, improve diagnostics.
Charles Lew [Thu, 19 Sep 2019 17:48:30 +0000 (01:48 +0800)]
Add more tests, fix span issue, improve diagnostics.

4 years agoAddress review comments.
Charles Lew [Wed, 18 Sep 2019 14:40:08 +0000 (22:40 +0800)]
Address review comments.

4 years agoAdd support for parsing #[link_ordinal] attribute.
Charles Lew [Wed, 28 Aug 2019 17:54:25 +0000 (01:54 +0800)]
Add support for parsing #[link_ordinal] attribute.

4 years agoAdd feature gate for raw_dylib.
Charles Lew [Tue, 27 Aug 2019 14:42:44 +0000 (22:42 +0800)]
Add feature gate for raw_dylib.

4 years agoAuto merge of #64906 - Aaron1011:feature/extern-const-fn, r=Centril
bors [Mon, 7 Oct 2019 00:12:12 +0000 (00:12 +0000)]
Auto merge of #64906 - Aaron1011:feature/extern-const-fn, r=Centril

Add support for `const unsafe? extern fn`

This works just as you might expect - an `const extern fn` is a `const fn` that is callable from foreign code.

Currently, panicking is not allowed in `const`s. When https://github.com/rust-lang/rfcs/pull/2345 (https://github.com/rust-lang/rust/issues/51999) is stabilized, then panicking in an `const extern fn` will produce a compile-time error when invoked at compile time, and an abort when invoked at runtime.

Since this is extending the language (we're allowing the `const` keyword in a new context), I believe that this will need an FCP. However, it's a very minor change, so I didn't think that filing an RFC was necessary.

This will allow libc (and other FFI crates) to make many functions `const`, without having to give up on making them `extern` as well.

Tracking issue: https://github.com/rust-lang/rust/issues/64926.

4 years agoUpdate reference
Tyler Mandry [Sun, 6 Oct 2019 21:40:08 +0000 (14:40 -0700)]
Update reference

771c5d10cf944bf7d221f5d6cb7abd2a06c400e4 Add macros in extern blocks and new proc-macro support.
8caabd62ef5fbe99e6be6aa9e76f55bbb8433d95 Update for "modern" `meta` matcher.
1b44947d36ccf7eba2b3bd245769eff68abf6d4d Update await desugaring after rust-lang/rust#64292

4 years agoAuto merge of #65169 - tmandry:rollup-qxjj8xp, r=tmandry
bors [Sun, 6 Oct 2019 20:24:37 +0000 (20:24 +0000)]
Auto merge of #65169 - tmandry:rollup-qxjj8xp, r=tmandry

Rollup of 5 pull requests

Successful merges:

 - #65095 (Sort error codes in librustc_passes)
 - #65101 (Upgrade librustc_macros dependencies)
 - #65142 (Ensure that associated `async fn`s have unique fresh param names)
 - #65155 (Use shorthand initialization in rustdoc)
 - #65158 (Remove dead module)

Failed merges:

r? @ghost

4 years agoUpdate ui tests
Guillaume Gomez [Sun, 6 Oct 2019 15:02:01 +0000 (17:02 +0200)]
Update ui tests

4 years agoRollup merge of #65158 - ishitatsuyuki:remove-dead, r=Mark-Simulacrum
Tyler Mandry [Sun, 6 Oct 2019 18:42:00 +0000 (11:42 -0700)]
Rollup merge of #65158 - ishitatsuyuki:remove-dead, r=Mark-Simulacrum

Remove dead module

This module is not referenced any more. (A quick audit didn't show other stale files like this, so presumably this is the only one.)

4 years agoRollup merge of #65155 - Avi-D-coder:fix-lints, r=Mark-Simulacrum
Tyler Mandry [Sun, 6 Oct 2019 18:41:59 +0000 (11:41 -0700)]
Rollup merge of #65155 - Avi-D-coder:fix-lints, r=Mark-Simulacrum

Use shorthand initialization in rustdoc

This just fixes a few lints I rust-analyzer was showing. Is this sort of PR useful? Should the lints be fixed as apart of the otherwise unrelated PR I was working on?

4 years agoRollup merge of #65142 - matthewjasper:unshadow-anon-lifetimes, r=petrochenkov
Tyler Mandry [Sun, 6 Oct 2019 18:41:57 +0000 (11:41 -0700)]
Rollup merge of #65142 - matthewjasper:unshadow-anon-lifetimes, r=petrochenkov

Ensure that associated `async fn`s have unique fresh param names

Closes #64630

4 years agoRollup merge of #65101 - mati865:rustc_macro-deps, r=nikomatsakis
Tyler Mandry [Sun, 6 Oct 2019 18:41:56 +0000 (11:41 -0700)]
Rollup merge of #65101 - mati865:rustc_macro-deps, r=nikomatsakis

Upgrade librustc_macros dependencies

Passed tests on Linux.

4 years agoRollup merge of #65095 - GuillaumeGomez:sort-librustc_passes-err-codes, r=varkor
Tyler Mandry [Sun, 6 Oct 2019 18:41:54 +0000 (11:41 -0700)]
Rollup merge of #65095 - GuillaumeGomez:sort-librustc_passes-err-codes, r=varkor

Sort error codes in librustc_passes

This is just a little cleanup.

4 years agoAuto merge of #64564 - jonas-schievink:cowardly-default, r=nikomatsakis
bors [Sun, 6 Oct 2019 16:32:46 +0000 (16:32 +0000)]
Auto merge of #64564 - jonas-schievink:cowardly-default, r=nikomatsakis

Deny specializing items not in the parent impl

Part of https://github.com/rust-lang/rust/issues/29661 (https://github.com/rust-lang/rfcs/pull/2532). At least sort of?

This was discussed in https://github.com/rust-lang/rust/pull/61812#discussion_r300504114 and is needed for that PR to make progress (fixing an unsoundness).

One annoyance with doing this is that it sometimes requires users to copy-paste a provided trait method into an impl just to mark it `default` (ie. there is no syntax to forward this impl method to the provided trait method).

cc @Centril and @arielb1

4 years agoAdd long error explanation for E0566
Guillaume Gomez [Sun, 6 Oct 2019 13:23:33 +0000 (15:23 +0200)]
Add long error explanation for E0566

4 years agoAuto merge of #65089 - nnethercote:optimize-integral-pattern-matching, r=Mark-Simulacrum
bors [Sun, 6 Oct 2019 12:50:47 +0000 (12:50 +0000)]
Auto merge of #65089 - nnethercote:optimize-integral-pattern-matching, r=Mark-Simulacrum

Optimize integral pattern matching

Various improvements to integral pattern matching. Together they reduce instruction counts for `unicode_normalization-check-clean` by about 16%.

r? @Mark-Simulacrum

4 years agosort error codes in librustc_passes
Guillaume Gomez [Sun, 6 Oct 2019 12:18:41 +0000 (14:18 +0200)]
sort error codes in librustc_passes

4 years agoAuto merge of #65043 - Aaron1011:fix/reexport-determinism, r=petrochenkov
bors [Sun, 6 Oct 2019 08:40:43 +0000 (08:40 +0000)]
Auto merge of #65043 - Aaron1011:fix/reexport-determinism, r=petrochenkov

Make re-export collection deterministic

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

Previously, we were using an `FxHashMap` to collect module re-exports.
However, re-exports end up getting serialized into crate metadata, which
means that metadata generation was non-deterministic. This resulted in
spurious error messages changes (e.g. PR #64906) due to pretty-printing
implicitly depending on the order of re-exports when computing the
proper path to show to the user.

See #65042 for a long-term strategy to detect this kind of issue

4 years agoUse shorthand initialization in rustdoc
Avi Dessauer [Sun, 6 Oct 2019 07:42:53 +0000 (03:42 -0400)]
Use shorthand initialization in rustdoc

4 years agoAuto merge of #65152 - tmandry:rollup-btn4a01, r=tmandry
bors [Sun, 6 Oct 2019 04:59:16 +0000 (04:59 +0000)]
Auto merge of #65152 - tmandry:rollup-btn4a01, r=tmandry

Rollup of 18 pull requests

This contains changes from all the successful runs that bors marked as timed out, plus a revert of #63649 which appears to be the immediate cause of the timeouts.

Successful merges:

 - #64708 (Stabilize `Option::as_deref` and `Option::as_deref_mut`)
 - #64728 (Stabilize UdpSocket::peer_addr)
 - #64765 (std: Reduce checks for `feature = "backtrace"`)
 - #64909 (When encountering chained operators use heuristics to recover from bad turbofish)
 - #65011 (Do not ICE when dereferencing non-Copy raw pointer)
 - #65064 (permit asyncawait-ondeck to be added by anyone)
 - #65066 ([const-prop] Fix ICE when trying to eval polymorphic promoted MIR)
 - #65100 (Replace GeneratorSubsts with SubstsRef)
 - #65105 (Split out some passes from librustc)
 - #65106 (Allow unused attributes to avoid incremental bug)
 - #65113 (Fix lonely backtick)
 - #65116 (Remove unneeded visit_statement definition)
 - #65118 (Update the documented default of -Z mutable-noalias)
 - #65123 (Account for macro invocation in `let mut $pat` diagnostic.)
 - #65124 (Replace some instances of `as *[const | mut] _` with `.cast()`)
 - #65126 (Fix typo on `now()` comments)
 - #65130 (lint: extern non-exhaustive types are improper)
 - #65151 (Revert #63649 - "Upgrade Emscripten targets to use upstream LLVM backend")

Failed merges:

r? @ghost

4 years agoRollup merge of #65151 - tmandry:revert-emscripten-upgrade, r=tmandry
Tyler Mandry [Sun, 6 Oct 2019 04:55:13 +0000 (21:55 -0700)]
Rollup merge of #65151 - tmandry:revert-emscripten-upgrade, r=tmandry

Revert #63649 - "Upgrade Emscripten targets to use upstream LLVM backend"

This change caused the runtime of the linux-asmjs builder to nearly double from 2+ hours to about 4 hours, which happens to be the bors timeout. (It made it in barely under 4 hours when it was merged.) This is causing timeouts on all new changes.

This reverts commit 7870050796e5904a0fc85ecbe6fa6dde1cfe0c91, reversing
changes made to 2e7244807a7878f6eca3eb7d97ae9b413aa49014.

4 years agoRollup merge of #65130 - davidtwco:rfc-2008-improper-ctypes, r=petrochenkov
Tyler Mandry [Sun, 6 Oct 2019 04:55:11 +0000 (21:55 -0700)]
Rollup merge of #65130 - davidtwco:rfc-2008-improper-ctypes, r=petrochenkov

lint: extern non-exhaustive types are improper

This PR makes the `improper_ctype` lint trigger for non-exhaustive types when those types aren't defined in the current crate, as per [this comment](https://github.com/rust-lang/rust/issues/44109#issuecomment-537583344).

cc @Centril

4 years agoRollup merge of #65126 - BO41:time_typo, r=kennytm
Tyler Mandry [Sun, 6 Oct 2019 04:55:10 +0000 (21:55 -0700)]
Rollup merge of #65126 - BO41:time_typo, r=kennytm

Fix typo on `now()` comments

Fix typo, update words, and remove some redundant word.
Also rustfmt on the rest of the file (hope this is okay :)

revival of #61433

r? @kennytm

4 years agoRollup merge of #65124 - memoryruins:castaway, r=petrochenkov
Tyler Mandry [Sun, 6 Oct 2019 04:55:08 +0000 (21:55 -0700)]
Rollup merge of #65124 - memoryruins:castaway, r=petrochenkov

Replace some instances of `as *[const | mut] _` with `.cast()`

While in `codegen_llvm`, noticed some places for the recent `pointer::cast` method.

4 years agoRollup merge of #65123 - Centril:mac-invoc-in-mut-pat, r=estebank
Tyler Mandry [Sun, 6 Oct 2019 04:55:07 +0000 (21:55 -0700)]
Rollup merge of #65123 - Centril:mac-invoc-in-mut-pat, r=estebank

Account for macro invocation in `let mut $pat` diagnostic.

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

r? @estebank

4 years agoRollup merge of #65118 - cuviper:Zmutable-noalias-default, r=rkruppe
Tyler Mandry [Sun, 6 Oct 2019 04:55:06 +0000 (21:55 -0700)]
Rollup merge of #65118 - cuviper:Zmutable-noalias-default, r=rkruppe

Update the documented default of -Z mutable-noalias

It has been fully disabled by default since #54639.

4 years agoRollup merge of #65116 - spastorino:remove-unneeded-fn, r=oli-obk
Tyler Mandry [Sun, 6 Oct 2019 04:55:04 +0000 (21:55 -0700)]
Rollup merge of #65116 - spastorino:remove-unneeded-fn, r=oli-obk

Remove unneeded visit_statement definition

r? @oli-obk

4 years agoRollup merge of #65113 - Qwaz:master, r=jonas-schievink
Tyler Mandry [Sun, 6 Oct 2019 04:55:03 +0000 (21:55 -0700)]
Rollup merge of #65113 - Qwaz:master, r=jonas-schievink

Fix lonely backtick

That backtick won't be sad anymore

4 years agoRollup merge of #65106 - Mark-Simulacrum:unused-attr-allow, r=Centril
Tyler Mandry [Sun, 6 Oct 2019 04:55:01 +0000 (21:55 -0700)]
Rollup merge of #65106 - Mark-Simulacrum:unused-attr-allow, r=Centril

Allow unused attributes to avoid incremental bug

cc #65023

This isn't labeled as fixing that issue because it's not really a fix, just a patch.

4 years agoRollup merge of #65105 - Mark-Simulacrum:split-librustc, r=nikomatsakis
Tyler Mandry [Sun, 6 Oct 2019 04:55:00 +0000 (21:55 -0700)]
Rollup merge of #65105 - Mark-Simulacrum:split-librustc, r=nikomatsakis

Split out some passes from librustc

This is just moving them out to librustc_passes -- I've not measured compile time or run time. I don't expect any significant impact, but this seems prudent regardless.

4 years agoRollup merge of #65100 - csmoe:generator, r=nikomatsakis
Tyler Mandry [Sun, 6 Oct 2019 04:54:59 +0000 (21:54 -0700)]
Rollup merge of #65100 - csmoe:generator, r=nikomatsakis

Replace GeneratorSubsts with SubstsRef

Closes #42340
r? @nikomatsakis

4 years agoRollup merge of #65066 - wesleywiser:fix_const_prop_ice_on_polymorphic_promoted_mir...
Tyler Mandry [Sun, 6 Oct 2019 04:54:57 +0000 (21:54 -0700)]
Rollup merge of #65066 - wesleywiser:fix_const_prop_ice_on_polymorphic_promoted_mir, r=oli-obk

[const-prop] Fix ICE when trying to eval polymorphic promoted MIR

Fixes #64908

r? @oli-obk
cc @nikomatsakis @pnkfelix

4 years agoRollup merge of #65064 - rust-lang:permit-asyncawait-ondeck-by-anyone, r=nikomatsakis
Tyler Mandry [Sun, 6 Oct 2019 04:54:56 +0000 (21:54 -0700)]
Rollup merge of #65064 - rust-lang:permit-asyncawait-ondeck-by-anyone, r=nikomatsakis

permit asyncawait-ondeck to be added by anyone

Still debating if this is the right approach

but r? @pietroalbini to check the format

4 years agoRollup merge of #65011 - estebank:ice-o-matic, r=zackmdavis
Tyler Mandry [Sun, 6 Oct 2019 04:54:54 +0000 (21:54 -0700)]
Rollup merge of #65011 - estebank:ice-o-matic, r=zackmdavis

Do not ICE when dereferencing non-Copy raw pointer

CC #52262. Confirmed to remove the unnecessary ICE, but without a repro case.

4 years agoRollup merge of #64909 - estebank:turbofish-reloaded, r=Centril
Tyler Mandry [Sun, 6 Oct 2019 04:54:52 +0000 (21:54 -0700)]
Rollup merge of #64909 - estebank:turbofish-reloaded, r=Centril

When encountering chained operators use heuristics to recover from bad turbofish

4 years agoRollup merge of #64765 - alexcrichton:less-check-backtrace, r=sfackler
Tyler Mandry [Sun, 6 Oct 2019 04:54:51 +0000 (21:54 -0700)]
Rollup merge of #64765 - alexcrichton:less-check-backtrace, r=sfackler

std: Reduce checks for `feature = "backtrace"`

This is a stylistic change to libstd to reduce the number of checks of
`feature = "backtrace"` now that we unconditionally depend on the
`backtrace` crate and rely on it having an empty implementation.
otherwise.

4 years agoRollup merge of #64728 - messense:udp-peer-addr, r=dtolnay
Tyler Mandry [Sun, 6 Oct 2019 04:54:49 +0000 (21:54 -0700)]
Rollup merge of #64728 - messense:udp-peer-addr, r=dtolnay

Stabilize UdpSocket::peer_addr

Fixes #59127

4 years agoRollup merge of #64708 - SimonSapin:option-deref, r=Centril
Tyler Mandry [Sun, 6 Oct 2019 04:54:47 +0000 (21:54 -0700)]
Rollup merge of #64708 - SimonSapin:option-deref, r=Centril

Stabilize `Option::as_deref` and `Option::as_deref_mut`

The tracking issue https://github.com/rust-lang/rust/issues/50264 still has unresolved question for the corresponding `Result` methods.

4 years agoRevert "Auto merge of #63649 - tlively:emscripten-upstream-upgrade, r=alexcrichton"
Tyler Mandry [Sun, 6 Oct 2019 04:38:45 +0000 (21:38 -0700)]
Revert "Auto merge of #63649 - tlively:emscripten-upstream-upgrade, r=alexcrichton"

This reverts commit 7870050796e5904a0fc85ecbe6fa6dde1cfe0c91, reversing
changes made to 2e7244807a7878f6eca3eb7d97ae9b413aa49014.

4 years agoEnsure that associated `async fn`s have unique fresh param names
Matthew Jasper [Sat, 5 Oct 2019 21:24:55 +0000 (22:24 +0100)]
Ensure that associated `async fn`s have unique fresh param names

4 years agoRemove `for_each_child_stable`
Aaron Hill [Sat, 5 Oct 2019 20:02:34 +0000 (16:02 -0400)]
Remove `for_each_child_stable`

Now that `Resolutions` has a deterministic iteration order, it's no
longer necessary to sort its entries before iterating over them

4 years agoMake re-export collection deterministic
Aaron Hill [Thu, 3 Oct 2019 04:31:21 +0000 (00:31 -0400)]
Make re-export collection deterministic

Previously, we were using an `FxHashMap` to collect module re-exports.
However, re-exports end up getting serialized into crate metadata, which
means that metadata generation was non-deterministic. This resulted in
spurious error messages changes (e.g. PR #64906) due to pretty-printing
implicitly depending on the order of re-exports when computing the
proper path to show to the user.

See #65042 for a long-term strategy to detect this kind of issue

4 years agoremove event that causes panics in measureme tools
Andreas Jonson [Sat, 5 Oct 2019 19:12:04 +0000 (21:12 +0200)]
remove event that causes panics in measureme tools

the measureme tools summarize and crox do not alow a event to go out of scope of the parent event

codegen_and_optimize_crate ends after the codegen_crate event

4 years agoRename the test
Jonas Schievink [Wed, 18 Sep 2019 23:04:23 +0000 (01:04 +0200)]
Rename the test

4 years agoExtend test and fix nits
Jonas Schievink [Wed, 18 Sep 2019 22:54:47 +0000 (00:54 +0200)]
Extend test and fix nits

4 years agoPacify tidy
Jonas Schievink [Wed, 18 Sep 2019 22:42:50 +0000 (00:42 +0200)]
Pacify tidy

4 years agoTest that we get the proper errors
Jonas Schievink [Wed, 18 Sep 2019 22:37:28 +0000 (00:37 +0200)]
Test that we get the proper errors

4 years agoFix the bootstrap
Jonas Schievink [Wed, 18 Sep 2019 22:14:02 +0000 (00:14 +0200)]
Fix the bootstrap

4 years agoHide the `Iterator` specialization behind a trait
Jonas Schievink [Wed, 18 Sep 2019 21:41:57 +0000 (23:41 +0200)]
Hide the `Iterator` specialization behind a trait

4 years agoAdd comment to `Type` and `OpaqueTy` match
Jonas Schievink [Wed, 18 Sep 2019 21:00:59 +0000 (23:00 +0200)]
Add comment to `Type` and `OpaqueTy` match

4 years agoDeny specializing items not in the parent impl
Jonas Schievink [Tue, 17 Sep 2019 22:09:19 +0000 (00:09 +0200)]
Deny specializing items not in the parent impl

4 years agolint: extern non-exhaustive types are improper
David Wood [Sat, 5 Oct 2019 13:06:51 +0000 (14:06 +0100)]
lint: extern non-exhaustive types are improper

This commit makes the `improper_ctype` lint trigger for non-exhaustive
types when those types aren't defined in the current crate.

Signed-off-by: David Wood <david@davidtw.co>
4 years agoFix typo on `now()` comments
BO41 [Sat, 5 Oct 2019 10:23:10 +0000 (12:23 +0200)]
Fix typo on `now()` comments

4 years agoReplaces some instances of `as *[const | mut] _` with `.cast()`
memoryruins [Sat, 5 Oct 2019 07:48:14 +0000 (03:48 -0400)]
Replaces some instances of `as *[const | mut] _` with `.cast()`

4 years agoAccount for macro invocation in `let mut $pat` diagnostic.
Mazdak Farrokhzad [Sat, 5 Oct 2019 02:34:26 +0000 (04:34 +0200)]
Account for macro invocation in `let mut $pat` diagnostic.

4 years agoUpdate the documented default of -Z mutable-noalias
Josh Stone [Fri, 4 Oct 2019 23:53:18 +0000 (16:53 -0700)]
Update the documented default of -Z mutable-noalias

It has been fully disabled by default since #54639.

4 years agoRemove unneeded visit_statement definition
Santiago Pastorino [Fri, 4 Oct 2019 21:10:19 +0000 (18:10 -0300)]
Remove unneeded visit_statement definition

visit_statement default definition does just this, there's no need to
redefine it.

4 years agoAuto merge of #63649 - tlively:emscripten-upstream-upgrade, r=alexcrichton
bors [Fri, 4 Oct 2019 20:33:02 +0000 (20:33 +0000)]
Auto merge of #63649 - tlively:emscripten-upstream-upgrade, r=alexcrichton

Upgrade Emscripten targets to use upstream LLVM backend

 - Refactors the Emscripten target spec to share code with other wasm
   targets.
 - Replaces the incorrect wasm32 C call ABI with the old asmjs
   version, which is correct for both wasm32 and JS.
 - Updates the varargs ABI used by Emscripten and deletes the old one.
 - Removes the obsolete wasm32-experimental-emscripten target.
 - Temporarily makes Emscripten targets use panic=abort by default
   because supporting unwinding will require an LLVM patch.

4 years agoFix lonely backtick
Yechan Bae [Fri, 4 Oct 2019 20:31:38 +0000 (16:31 -0400)]
Fix lonely backtick

4 years agoAdd ignore-asmjs to new test
Thomas Lively [Fri, 4 Oct 2019 16:37:50 +0000 (09:37 -0700)]
Add ignore-asmjs to new test

4 years agoAllow unused attributes to avoid incremental bug
Mark Rousskov [Fri, 4 Oct 2019 14:43:15 +0000 (10:43 -0400)]
Allow unused attributes to avoid incremental bug

4 years agomiddle::intrinsicck -> rustc_passes
Mark Rousskov [Fri, 4 Oct 2019 14:46:57 +0000 (10:46 -0400)]
middle::intrinsicck -> rustc_passes

4 years agomiddle::entry -> rustc_passes
Mark Rousskov [Fri, 4 Oct 2019 14:37:40 +0000 (10:37 -0400)]
middle::entry -> rustc_passes

4 years agomiddle::dead -> rustc_passes
Mark Rousskov [Fri, 4 Oct 2019 14:33:11 +0000 (10:33 -0400)]
middle::dead -> rustc_passes

4 years agomove middle::liveness to rustc_passes
Mark Rousskov [Fri, 4 Oct 2019 14:31:28 +0000 (10:31 -0400)]
move middle::liveness to rustc_passes

4 years ago[const-prop] Fix ICE when trying to eval polymorphic promoted MIR
Wesley Wiser [Thu, 3 Oct 2019 17:43:07 +0000 (13:43 -0400)]
[const-prop] Fix ICE when trying to eval polymorphic promoted MIR

4 years agoRemove dead module
Tatsuyuki Ishi [Fri, 4 Oct 2019 13:55:10 +0000 (22:55 +0900)]
Remove dead module

4 years agoclean up GeneratorSubsts
csmoe [Thu, 3 Oct 2019 13:51:30 +0000 (21:51 +0800)]
clean up GeneratorSubsts

4 years agoremove GeneratorSubsts visitors
csmoe [Thu, 3 Oct 2019 13:30:26 +0000 (21:30 +0800)]
remove GeneratorSubsts visitors

4 years agoreplace GeneratorSubsts inside related types
csmoe [Thu, 3 Oct 2019 13:28:04 +0000 (21:28 +0800)]
replace GeneratorSubsts inside related types

4 years agogenerate GeneratorSubsts from SubstsRef
csmoe [Thu, 3 Oct 2019 13:21:28 +0000 (21:21 +0800)]
generate GeneratorSubsts from SubstsRef

4 years agoreplace GeneratorSubsts with SubstsRef
csmoe [Thu, 3 Oct 2019 13:02:06 +0000 (21:02 +0800)]
replace GeneratorSubsts with SubstsRef

4 years agoUpgrade librustc_macros dependencies
Mateusz Mikuła [Fri, 4 Oct 2019 12:43:23 +0000 (14:43 +0200)]
Upgrade librustc_macros dependencies

4 years agoAuto merge of #64994 - GuillaumeGomez:fix-rustdoc-display-js-disabled, r=Mark-Simulacrum
bors [Fri, 4 Oct 2019 12:17:13 +0000 (12:17 +0000)]
Auto merge of #64994 - GuillaumeGomez:fix-rustdoc-display-js-disabled, r=Mark-Simulacrum

Fix rustdoc display with js disabled

Fixes #64988.

Currently, all sections are collapsed when the page is loading, and then is displayed once done. However, if js is disabled, they never get expanded. Therefore, they need to be shown by default.

r? @Mark-Simulacrum

4 years agoAdd C ABI for wasm-bindgen compat
Thomas Lively [Thu, 3 Oct 2019 22:00:03 +0000 (15:00 -0700)]
Add C ABI for wasm-bindgen compat

4 years agoRemove asmjs and wasm32 from PR CI
Thomas Lively [Wed, 2 Oct 2019 22:20:19 +0000 (15:20 -0700)]
Remove asmjs and wasm32 from PR CI

4 years agoRevert "Temporarily enable wasm32 CI"
Thomas Lively [Wed, 2 Oct 2019 22:19:31 +0000 (15:19 -0700)]
Revert "Temporarily enable wasm32 CI"

4 years agoTemporarily enable wasm32 CI
Thomas Lively [Wed, 2 Oct 2019 18:12:20 +0000 (11:12 -0700)]
Temporarily enable wasm32 CI

4 years agoFix ABI, run and fix more tests, re-enable CI for PRs
Thomas Lively [Wed, 2 Oct 2019 18:02:25 +0000 (11:02 -0700)]
Fix ABI, run and fix more tests, re-enable CI for PRs

4 years agoUpgrade Emscripten targets to use upstream LLVM backend
Thomas Lively [Sat, 17 Aug 2019 05:08:01 +0000 (22:08 -0700)]
Upgrade Emscripten targets to use upstream LLVM backend

 - Refactors the Emscripten target spec to share code with other wasm
   targets.
 - Replaces the incorrect wasm32 C call ABI with the old asmjs
   version, which is correct for both wasm32 and JS.
 - Updates the varargs ABI used by Emscripten and deletes the old one.
 - Removes the obsolete wasm32-experimental-emscripten target.
 - Temporarily makes Emscripten targets use panic=abort by default
   because supporting unwinding will require an LLVM patch.

4 years agoAuto merge of #65087 - Centril:rollup-skxq0zr, r=Centril
bors [Fri, 4 Oct 2019 07:27:59 +0000 (07:27 +0000)]
Auto merge of #65087 - Centril:rollup-skxq0zr, r=Centril

Rollup of 5 pull requests

Successful merges:

 - #64749 (Fix most remaining Polonius test differences)
 - #64817 (Replace ClosureSubsts with SubstsRef)
 - #64874 (Simplify ExprUseVisitor)
 - #65026 (metadata: Some crate loading cleanup)
 - #65073 (Remove `borrowck_graphviz_postflow` from test)

Failed merges:

r? @ghost

4 years agoReplace `flat_map()` with `filter_map()` in `is_useful_specialized()`.
Nicholas Nethercote [Fri, 4 Oct 2019 06:22:13 +0000 (16:22 +1000)]
Replace `flat_map()` with `filter_map()` in `is_useful_specialized()`.

`filter_map()` is less general, but more efficient, and has the same
effect in this case.

This commit reduces the instruction count for
`unicode_normalization-check-clean` by about 2%.

4 years agoIntroduce a special case in `IntRange::from_const`.
Nicholas Nethercote [Fri, 4 Oct 2019 04:29:20 +0000 (14:29 +1000)]
Introduce a special case in `IntRange::from_const`.

The `if let Some(val) = value.try_eval_bits(...)` branch in `from_const()` is
very hot for the `unicode_normalization` benchmark.

This commit introduces a special-case alternative for scalars that avoids
`try_eval_bits()` and all the functions it calls (`Const::eval()`,
`ConstValue::try_to_bits()`, `ConstValue::try_to_scalar()`, and
`Scalar::to_bits()`), instead extracting the result immediately.

The type and value checking done by `Scalar::to_bits()` is replicated by moving
it into a new function `Scalar::check_raw()` and using that new function in the
special case.

PR #64673 introduced some special-case handling of scalar types in
`Const::try_eval_bits()`. This handling is now moved out of that function into
the new `IntRange::integral_size_and_signed_bias` function.

This commit reduces the instruction count for
`unicode_normalization-check-clean` by about 10%.

4 years agoRearrange `IntRange::from_{ctor,pat}()`.
Nicholas Nethercote [Fri, 4 Oct 2019 03:16:37 +0000 (13:16 +1000)]
Rearrange `IntRange::from_{ctor,pat}()`.

This commit moves a lot of code around but doesn't change functionality
at all. The main goal was for `from_pat()` to no longer call
`from_ctor()`.

The increase in inlining resulted in less function call overhead, for a
3% instruction count win on `unicode_normalization-check-clean`.

4 years agoInline and remove `constructor_intersects_pattern()`.
Nicholas Nethercote [Fri, 4 Oct 2019 01:04:14 +0000 (11:04 +1000)]
Inline and remove `constructor_intersects_pattern()`.

This is a 2% instruction count win on `unicode_normalization-check-clean`.

4 years agoCombine two `match` arms in `specialize()`.
Nicholas Nethercote [Fri, 4 Oct 2019 01:02:04 +0000 (11:02 +1000)]
Combine two `match` arms in `specialize()`.

This reduces the number of call sites for
`constructor_intersects_pattern()` from two to one, which the next
commit will take advantage of.

4 years agoRollup merge of #65073 - ecstatic-morse:issue-65071, r=petrochenkov
Mazdak Farrokhzad [Fri, 4 Oct 2019 05:24:39 +0000 (07:24 +0200)]
Rollup merge of #65073 - ecstatic-morse:issue-65071, r=petrochenkov

Remove `borrowck_graphviz_postflow` from test

Resolves #65071.

r? @petrochenkov