Commit Graph

119918 Commits

Author SHA1 Message Date
Gary Guo
564ebbb0d1 Use fcntl-based file lock for non-Linux unix 2020-05-20 02:27:50 +01:00
Gary Guo
a23dd0d1e6 Replace fcntl-based file lock with flock
WSL1 does not support `fcntl`-based lock and will always report success,
therefore creating a race condition when multiple rustc processes are
modifying shared data such as `search-index.js`. WSL1 does however
support `flock`.

`flock` is supported by all unix-like platforms. The only caveat is that
Linux 2.6.11 or earlier does not support `flock` on NFS mounts, but as
the minimum supported Linux version is 2.6.18, it is not an issue.

Fixes #72157
2020-05-13 02:49:22 +01:00
bors
769d12eec1 Auto merge of #72091 - RalfJung:miri, r=RalfJung
update miri

Fixes https://github.com/rust-lang/rust/issues/72037
Cc @rust-lang/miri r? @ghost
2020-05-12 13:59:16 +00:00
bors
d903a9def4 Auto merge of #72134 - Dylan-DPC:rollup-h3shfz5, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #71737 (Miri: run liballoc tests with threads)
 - #71928 (Add strikethrough support to rustdoc)
 - #72048 (Visit move out of `_0` when visiting `return`)
 - #72096 (Make MIR typeck use `LocalDefId` and fix docs)
 - #72128 (strings do not have to be valid UTF-8 any more)

Failed merges:

r? @ghost
2020-05-12 10:28:08 +00:00
Dylan DPC
ceeb9bdee6
Rollup merge of #72128 - RalfJung:str-validity, r=oli-obk
strings do not have to be valid UTF-8 any more

Cc https://github.com/rust-lang/reference/pull/792
r? @oli-obk
2020-05-12 11:41:15 +02:00
Dylan DPC
31e5be027e
Rollup merge of #72096 - jonas-schievink:mirck-docs, r=matthewjasper
Make MIR typeck use `LocalDefId` and fix docs

The docs on `fn type_check` were not in sync with the arguments it takes.

r? @matthewjasper
2020-05-12 11:41:13 +02:00
Dylan DPC
0f9563091f
Rollup merge of #72048 - jonas-schievink:visit-return, r=oli-obk
Visit move out of `_0` when visiting `return`

Closes https://github.com/rust-lang/rust/issues/72032
2020-05-12 11:41:12 +02:00
Dylan DPC
5fe77e5997
Rollup merge of #71928 - mibac138:strikethrough, r=GuillaumeGomez
Add strikethrough support to rustdoc

Implements uncontroversial part of #71183.
r? @GuillaumeGomez
2020-05-12 11:41:10 +02:00
Dylan DPC
2a1581c50c
Rollup merge of #71737 - RalfJung:miri-test-threads, r=shepmaster
Miri: run liballoc tests with threads

Miri now supports threads, so we can run these tests. :)
2020-05-12 11:41:05 +02:00
Ralf Jung
6f9810c981 strings do not have to be valid UTF-8 any more 2020-05-12 09:46:41 +02:00
bors
09c817eeb2 Auto merge of #72120 - Dylan-DPC:rollup-ca0tur2, r=Dylan-DPC
Rollup of 10 pull requests

Successful merges:

 - #72014 (Deprecated emoji)
 - #72019 (Fix debug assertion in error code)
 - #72027 (Use CDN for ci-caches on download)
 - #72044 (use min_specialization for some rustc crates where it requires no changes)
 - #72052 (display `ConstKind::Param`)
 - #72067 (Emit a warning when optimization fuel runs out)
 - #72072 (doc: minus (U+2212) instead of dash (U+002D) for negative infinity)
 - #72077 (Improve E0571 wording)
 - #72107 (Clean up E0579 explanation)
 - #72109 (Fix clippy warnings)

Failed merges:

r? @ghost
2020-05-11 23:14:06 +00:00
Dylan DPC
dfa3677bee
Rollup merge of #72109 - matthiaskrgr:cl8ppy, r=Dylan-DPC
Fix clippy warnings

Fixes clippy::{cone_on_copy, filter_next, redundant_closure, single_char_pattern, len_zero,redundant_field_names, useless_format, identity_conversion, map_clone, into_iter_on_ref, needless_return, option_as_ref_deref, unused_unit, unnecessary_mut_passed}

r? @Dylan-DPC
2020-05-11 22:21:08 +02:00
Dylan DPC
dd53768692
Rollup merge of #72107 - GuillaumeGomez:cleanup-e0579, r=Dylan-DPC
Clean up E0579 explanation

r? @Dylan-DPC
2020-05-11 22:21:07 +02:00
Dylan DPC
400a9bae49
Rollup merge of #72077 - GuillaumeGomez:cleanup-E0571, r=Dylan-DPC
Improve E0571 wording

r? @Dylan-DPC
2020-05-11 22:21:05 +02:00
Dylan DPC
6a8ac8b975
Rollup merge of #72072 - tspiteri:minus-inf, r=Dylan-DPC
doc: minus (U+2212) instead of dash (U+002D) for negative infinity

Like #67430, for the new associated constants.
2020-05-11 22:21:03 +02:00
Dylan DPC
d9c3110ae8
Rollup merge of #72067 - jonas-schievink:fuel-warn, r=varkor
Emit a warning when optimization fuel runs out

`eprintln!` gets swallowed by Cargo too easily.
2020-05-11 22:21:01 +02:00
Dylan DPC
a14af7fff8
Rollup merge of #72052 - lcnr:const_pprint, r=ecstatic-morse
display `ConstKind::Param`
2020-05-11 22:20:59 +02:00
Dylan DPC
eade6f7881
Rollup merge of #72044 - RalfJung:min-spec, r=matthewjasper
use min_specialization for some rustc crates where it requires no changes

and add FIXME for the rest

Cc @matthewjasper
2020-05-11 22:20:57 +02:00
Dylan DPC
9c4c52fd77
Rollup merge of #72027 - Mark-Simulacrum:ci-caches, r=pietroalbini
Use CDN for ci-caches on download

This will reduce costs, as well as lays the groundwork for developers to be able
to locally pull the published docker images without needing AWS credentials.

r? @pietroalbini
2020-05-11 22:20:55 +02:00
Dylan DPC
705671ef49
Rollup merge of #72019 - matthewjasper:dont-skip-binder, r=davidtwco
Fix debug assertion in error code

Closes #70813
2020-05-11 22:20:54 +02:00
Dylan DPC
dd595fade5
Rollup merge of #72014 - GuillaumeGomez:deprecated-emoji, r=kinnison,ollie27
Deprecated emoji

Fixes #67872.

r? @kinnison

cc @rust-lang/rustdoc
2020-05-11 22:20:51 +02:00
bors
99cb9ccb9c Auto merge of #72089 - Mark-Simulacrum:error-is-really-an-error, r=pietroalbini
Fail if I/O error occurs during testing

First known case of this is in https://github.com/rust-lang/rust/pull/72053#issuecomment-626364402 but may have happened before then.

r? @pietroalbini
2020-05-11 16:33:26 +00:00
Matthias Krüger
8bfd84539e Fix clippy warnings
Fixes clippy::{cone_on_copy, filter_next, redundant_closure, single_char_pattern, len_zero,redundant_field_names, useless_format, identity_conversion, map_clone, into_iter_on_ref, needless_return, option_as_ref_deref, unused_unit, unnecessary_mut_passed}
2020-05-11 17:13:32 +02:00
Mark Rousskov
9a4e7183d4 Configure cache domain for GHA 2020-05-11 10:50:53 -04:00
Ralf Jung
7bea58eeac fix test_weak_count_locked for Miri 2020-05-11 16:49:36 +02:00
Guillaume Gomez
806f09cf21 Clean up E0579 explanation 2020-05-11 13:22:56 +02:00
Ralf Jung
42f70d503b update miri some more 2020-05-11 12:13:53 +02:00
bors
3fe4dd2dda Auto merge of #71953 - oli-obk:const_prop_deaggregates, r=wesleywiser
Const prop aggregates even if partially or fully modified

r? @wesleywiser

cc @rust-lang/wg-mir-opt I'm moderately scared of this change, but I'm confident in having reviewed all the cases.
2020-05-11 07:23:31 +00:00
Jonas Schievink
a32463ade4 Make MIR typeck use LocalDefId and fix docs 2020-05-11 02:19:34 +02:00
Ralf Jung
82e81191e4 update miri 2020-05-10 23:55:41 +02:00
Mark Rousskov
a5ba75283e Fail if I/O error occurs during testing 2020-05-10 16:53:48 -04:00
bors
aeb473803d Auto merge of #71825 - contrun:cg-option-strip, r=petrochenkov
add codegen option strip

closes https://github.com/rust-lang/rust/issues/71757

I don't know if the flags added here works for all linkers. I only tested on my Linux pc. I also don't know what is the best for emlinker, PtxLinker, MsvcLinker. The option for WasmLd is copied from https://aransentin.github.io/cwasm/.
2020-05-10 20:48:40 +00:00
Jonas Schievink
62116c31cd Emit a warning when optimization fuel runs out
`eprintln!` gets swallowed by Cargo too easily.
2020-05-10 15:40:17 +02:00
bors
9912925c25 Auto merge of #72074 - RalfJung:rollup-1ns58no, r=RalfJung
Rollup of 4 pull requests

Successful merges:

 - #71840 (Rework MIR drop tree lowering)
 - #71882 (Update the `cc` crate)
 - #71945 (Sort "implementations on foreign types" section in the sidebar)
 - #72043 (Add missing backtick in E0569 explanation)

Failed merges:

r? @ghost
2020-05-10 12:07:34 +00:00
Guillaume Gomez
0aaff14ae3 Improve E0571 wording 2020-05-10 12:40:11 +02:00
Ralf Jung
f2b655f110
Rollup merge of #72043 - GuillaumeGomez:clean-up-e0569, r=Dylan-DPC
Add missing backtick in E0569 explanation

r? @Dylan-DPC
2020-05-10 11:34:36 +02:00
Ralf Jung
d22c18b396
Rollup merge of #71945 - GuillaumeGomez:sort-impl-on-foreign-types-section, r=kinnison,ollie27
Sort "implementations on foreign types" section in the sidebar

Fixes #71926.

We were sorting by the ID instead of sorting by the name. They're not in the same order as the implementations but I think it makes more sense this way considering this is what we do for the methods as well.

r? @kinnison

cc @rust-lang/rustdoc
2020-05-10 11:34:34 +02:00
Ralf Jung
37a9192826
Rollup merge of #71882 - alexcrichton:update-cc, r=Mark-Simulacrum
Update the `cc` crate

Pulls in updated MSVC detection logic landed in alexcrichton/cc-rs#488
2020-05-10 11:34:32 +02:00
Ralf Jung
62353071af
Rollup merge of #71840 - matthewjasper:drop-trees, r=oli-obk
Rework MIR drop tree lowering

This PR changes how drops are generated in MIR construction. This is the first half of the fix for #47949.

Rather than generating the drops for a given unwind/break/continue/return/generator drop path as soon as they are needed, the required drops are recorded and get generated later.

The motivation for this is
* It simplifies the caching scheme, because it's now possible to walk up the currently scheduled drop tree to recover state.
* The basic block order for MIR more closely resembles execution order.

This PR also:
* Highlights cleanup blocks in the graphviz MIR output.
* Removes some unnecessary drop flag assignments.
2020-05-10 11:34:30 +02:00
Ralf Jung
c82103cb21 use min_specialization for some rustc crates where it requires no changes 2020-05-10 11:25:00 +02:00
Trevor Spiteri
0ceacd022c doc: minus (U+2212) instead of dash (U+002D) for negative infinity 2020-05-10 11:24:06 +02:00
YI
a6c2f73b6e add linking option strip
move strip option to "Z"

add more strip options, remove strip-debuginfo-if-disabled

merge strip and debuginfo
2020-05-10 16:44:46 +08:00
bors
8d16eeb8c9 Auto merge of #71775 - petrochenkov:crtcfg, r=matthewjasper
Enable `cfg` predicate for `target_feature = "crt-static"` only if the target supports it

That's what all other `target_feature`s do.
2020-05-10 08:25:32 +00:00
bors
b3269536d0 Auto merge of #72020 - alexcrichton:fix-incremental-linker-plugin-lto, r=oli-obk
Fix disagreeement about CGU reuse and LTO

This commit fixes an issue where the codegen backend's selection of LTO
disagreed with what the codegen later thought was being done. Discovered
in #72006 we have a longstanding issue where if `-Clinker-plugin-lto` in
optimized mode is compiled incrementally it will always panic on the
second compilation. The underlying issue turned out to be that the
production of the original artifact determined that LTO should not be
done (because it's being postponed to the linker) but the CGU reuse
selection thought that LTO was done so it was trying to load pre-LTO
artifacts which were never generated.

The fix here is to ensure that the logic when generating code which
determines what kind of LTO is being done is shared amongst the CGU
reuse decision and the backend actually doing LTO. This means that
they'll both be in agreement about whether the previous compilation did
indeed produce incremental pre-LTO artifacts.

Closes #72006
2020-05-10 04:41:01 +00:00
Alex Crichton
c7bd5a635e Fix disagreeement about CGU reuse and LTO
This commit fixes an issue where the codegen backend's selection of LTO
disagreed with what the codegen later thought was being done. Discovered
in #72006 we have a longstanding issue where if `-Clinker-plugin-lto` in
optimized mode is compiled incrementally it will always panic on the
second compilation. The underlying issue turned out to be that the
production of the original artifact determined that LTO should not be
done (because it's being postponed to the linker) but the CGU reuse
selection thought that LTO was done so it was trying to load pre-LTO
artifacts which were never generated.

The fix here is to ensure that the logic when generating code which
determines what kind of LTO is being done is shared amongst the CGU
reuse decision and the backend actually doing LTO. This means that
they'll both be in agreement about whether the previous compilation did
indeed produce incremental pre-LTO artifacts.

Closes #72006
2020-05-09 19:30:48 -07:00
bors
6f5c7827b7 Auto merge of #71557 - matthewjasper:mir-asymmetric-or-pattern, r=oli-obk
Fix ICE for broken or-pattern in async fn

closes #71297
2020-05-10 01:12:21 +00:00
bors
0a3619c9e5 Auto merge of #69530 - Aaron1011:perf/skip-coerce-var, r=nikomatsakis
[perf] Skip attempting to run coerce_unsized on an inference variable

See the included comment for a detailed explanation of why this is
sound.
2020-05-09 21:01:19 +00:00
bors
bad3bf622b Auto merge of #72041 - RalfJung:rollup-xivrvy2, r=RalfJung
Rollup of 5 pull requests

Successful merges:

 - #69406 (upgrade chalk and use chalk-solve/chalk-ir/chalk-rust-ir)
 - #71185 (Move tests from `test/run-fail` to UI)
 - #71234 (rustllvm: Use .init_array rather than .ctors)
 - #71508 (Simplify the `tcx.alloc_map` API)
 - #71555 (Remove ast::{Ident, Name} reexports.)

Failed merges:

r? @ghost
2020-05-09 17:31:08 +00:00
Bastian Kauschke
0db2aec14a display ConstKind::Param 2020-05-09 17:10:40 +02:00
Jonas Schievink
e22cc993fb Visit move out of _0 when visiting return 2020-05-09 16:08:04 +02:00