100200 Commits

Author SHA1 Message Date
Aaron Hill
dd403e4ab0
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
2019-10-05 15:57:48 -04:00
Andreas Jonson
993e3a52cb 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
2019-10-05 21:12:04 +02:00
Jonas Schievink
47f89e7485 Rename the test 2019-10-05 15:33:26 +02:00
Jonas Schievink
33d23cdf04 Extend test and fix nits 2019-10-05 15:33:26 +02:00
Jonas Schievink
98f02b2362 Pacify tidy 2019-10-05 15:33:26 +02:00
Jonas Schievink
a0cf5315ef Test that we get the proper errors 2019-10-05 15:33:26 +02:00
Jonas Schievink
9aaef06cf6 Fix the bootstrap 2019-10-05 15:33:26 +02:00
Jonas Schievink
02f36e52a6 Hide the Iterator specialization behind a trait 2019-10-05 15:33:25 +02:00
Jonas Schievink
55277d4a6e Add comment to Type and OpaqueTy match 2019-10-05 15:33:25 +02:00
Jonas Schievink
2cd5030ef5 Deny specializing items not in the parent impl 2019-10-05 15:33:24 +02:00
David Wood
080aa86635
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>
2019-10-05 14:06:51 +01:00
BO41
318ff305ea Fix typo on now() comments 2019-10-05 12:23:10 +02:00
memoryruins
173958ac80 Replaces some instances of as *[const | mut] _ with .cast() 2019-10-05 03:48:14 -04:00
Mazdak Farrokhzad
5f94a53d1a Account for macro invocation in let mut $pat diagnostic. 2019-10-05 04:34:26 +02:00
Josh Stone
8bb5c12c0b Update the documented default of -Z mutable-noalias
It has been fully disabled by default since #54639.
2019-10-04 16:53:18 -07:00
Santiago Pastorino
c5f80aa508
Remove unneeded visit_statement definition
visit_statement default definition does just this, there's no need to
redefine it.
2019-10-04 18:10:23 -03:00
bors
7870050796 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.
2019-10-04 20:33:02 +00:00
Yechan Bae
d152d48727 Fix lonely backtick 2019-10-04 16:31:38 -04:00
Thomas Lively
4a4df29d6f Add ignore-asmjs to new test 2019-10-04 09:37:50 -07:00
Mark Rousskov
d0a6805b0e Allow unused attributes to avoid incremental bug 2019-10-04 11:11:58 -04:00
Mark Rousskov
7c3f65b3c4 middle::intrinsicck -> rustc_passes 2019-10-04 11:11:33 -04:00
Mark Rousskov
82bfd8eb0d middle::entry -> rustc_passes 2019-10-04 11:11:33 -04:00
Mark Rousskov
bb707824d0 middle::dead -> rustc_passes 2019-10-04 11:11:33 -04:00
Mark Rousskov
91a096a9b8 move middle::liveness to rustc_passes 2019-10-04 11:11:33 -04:00
Wesley Wiser
e9009c86d2 [const-prop] Fix ICE when trying to eval polymorphic promoted MIR 2019-10-04 10:23:03 -04:00
Tatsuyuki Ishi
c97f5f0045 Remove dead module 2019-10-04 22:55:10 +09:00
csmoe
afc0bb9794 clean up GeneratorSubsts 2019-10-04 20:47:43 +08:00
csmoe
ef9fe10280 remove GeneratorSubsts visitors 2019-10-04 20:47:43 +08:00
csmoe
774ea808be replace GeneratorSubsts inside related types 2019-10-04 20:47:43 +08:00
csmoe
fa7a87be63 generate GeneratorSubsts from SubstsRef 2019-10-04 20:47:43 +08:00
csmoe
2d87bace96 replace GeneratorSubsts with SubstsRef 2019-10-04 20:47:43 +08:00
Mateusz Mikuła
d89608829c Upgrade librustc_macros dependencies 2019-10-04 14:43:23 +02:00
bors
2e7244807a 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
2019-10-04 12:17:13 +00:00
Thomas Lively
43c4b81be7 Add C ABI for wasm-bindgen compat 2019-10-04 00:47:21 -07:00
Thomas Lively
63955bbdf9 Remove asmjs and wasm32 from PR CI 2019-10-04 00:47:21 -07:00
Thomas Lively
b78cc69cc8 Revert "Temporarily enable wasm32 CI" 2019-10-04 00:47:21 -07:00
Thomas Lively
1b4d5ec0f7 Temporarily enable wasm32 CI 2019-10-04 00:47:21 -07:00
Thomas Lively
5b56c660c9 Fix ABI, run and fix more tests, re-enable CI for PRs 2019-10-04 00:47:21 -07:00
Thomas Lively
9a55103b98 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.
2019-10-04 00:47:21 -07:00
bors
9e35a2811d 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
2019-10-04 07:27:59 +00:00
Nicholas Nethercote
2a3a544741 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%.
2019-10-04 17:04:00 +10:00
Nicholas Nethercote
5515a97646 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%.
2019-10-04 17:03:41 +10:00
Nicholas Nethercote
a69e0e0ab4 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`.
2019-10-04 17:01:10 +10:00
Nicholas Nethercote
62ea39a1c9 Inline and remove constructor_intersects_pattern().
This is a 2% instruction count win on `unicode_normalization-check-clean`.
2019-10-04 17:00:19 +10:00
Nicholas Nethercote
9a1a3b9013 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.
2019-10-04 16:58:44 +10:00
Mazdak Farrokhzad
aacc89a1dd
Rollup merge of #65073 - ecstatic-morse:issue-65071, r=petrochenkov
Remove `borrowck_graphviz_postflow` from test

Resolves #65071.

r? @petrochenkov
2019-10-04 07:24:39 +02:00
Mazdak Farrokhzad
a16c637374
Rollup merge of #65026 - petrochenkov:ice1, r=eddyb
metadata: Some crate loading cleanup

So, my goal was to fix caching of loaded crates which is broken and causes ICEs like #56935 or #64450.
While investigating I found that the code is pretty messy and likes to confuse various things that look similar but are actually different.
This PR does some initial cleanup in that area, I hope to get to the caching itself a bit later.
2019-10-04 07:24:37 +02:00
Mazdak Farrokhzad
cb4145e759
Rollup merge of #64874 - matthewjasper:simplify-euv, r=eddyb
Simplify ExprUseVisitor

* Remove HIR const qualification
* Remove parts of ExprUseVisitor that aren't being used

r? @eddyb
2019-10-04 07:24:36 +02:00
Mazdak Farrokhzad
17e1f23209
Rollup merge of #64817 - csmoe:closure, r=nikomatsakis
Replace ClosureSubsts with SubstsRef

Addresses https://github.com/rust-lang/rust/issues/42340 part 3
https://github.com/rust-lang/rust/pull/59312 might benefit from this clean up.
r? @nikomatsakis
2019-10-04 07:24:34 +02:00
Mazdak Farrokhzad
314fbf48cf
Rollup merge of #64749 - matthewjasper:liveness-opt, r=nikomatsakis
Fix most remaining Polonius test differences

This fixes most of the Polonius test differences and also avoids overflow in issue-38591.rs.

r? @nikomatsakis
2019-10-04 07:24:33 +02:00