]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoSGX mutex is movable
Jethro Beekman [Fri, 7 May 2021 11:21:38 +0000 (13:21 +0200)]
SGX mutex is movable

3 years agoAuto merge of #85022 - JohnTitor:rollup-2q4706v, r=JohnTitor
bors [Fri, 7 May 2021 07:44:53 +0000 (07:44 +0000)]
Auto merge of #85022 - JohnTitor:rollup-2q4706v, r=JohnTitor

Rollup of 9 pull requests

Successful merges:

 - #84779 (Add support for --test-args to cargotest)
 - #84781 (Don't check bootstrap artifacts by default)
 - #84787 (bump deps)
 - #84815 (Update coverage docs and command line help)
 - #84875 (Removes unneeded check of `#[no_coverage]` in mapgen)
 - #84897 (Coverage instruments closure bodies in macros (not the macro body))
 - #84911 (Retry clang+llvm download)
 - #84972 (CTFE inbounds-error-messages tweak)
 - #84990 (Sort rustdoc-gui tests)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

3 years agoRollup merge of #84990 - GuillaumeGomez:sort-rustdoc-gui-tests, r=Mark-Simulacrum
Yuki Okushi [Fri, 7 May 2021 06:20:30 +0000 (15:20 +0900)]
Rollup merge of #84990 - GuillaumeGomez:sort-rustdoc-gui-tests, r=Mark-Simulacrum

Sort rustdoc-gui tests

The rustdoc-gui tests were randomly run. Not really a big issue but I prefer the tests to be sorted.

3 years agoRollup merge of #84972 - RalfJung:null-ptr-msg, r=oli-obk
Yuki Okushi [Fri, 7 May 2021 06:20:29 +0000 (15:20 +0900)]
Rollup merge of #84972 - RalfJung:null-ptr-msg, r=oli-obk

CTFE inbounds-error-messages tweak

* use CheckInAllocMsg::PointerArithmeticTest for ptr_offset error
* nicer errors for some null pointer cases

r? `@oli-obk`

3 years agoRollup merge of #84911 - Mark-Simulacrum:retry-clang, r=pietroalbini
Yuki Okushi [Fri, 7 May 2021 06:20:28 +0000 (15:20 +0900)]
Rollup merge of #84911 - Mark-Simulacrum:retry-clang, r=pietroalbini

Retry clang+llvm download

We've been seeing a pretty high rate of spurious network failures (e.g., openssl
connection reset by peer). Not clear why, but let's add a retry.

r? `@pietroalbini`

3 years agoRollup merge of #84897 - richkadel:cover-closure-macros, r=tmandry
Yuki Okushi [Fri, 7 May 2021 06:20:26 +0000 (15:20 +0900)]
Rollup merge of #84897 - richkadel:cover-closure-macros, r=tmandry

Coverage instruments closure bodies in macros (not the macro body)

Fixes: #84884
This solution might be considered a compromise, but I think it is the
better choice.

The results in the `closure.rs` test correctly resolve all test cases
broken as described in #84884.

One test pattern (in both `closure_macro.rs` and
`closure_macro_async.rs`) was also affected, and removes coverage
statistics for the lines inside the closure, because the closure
includes a macro. (The coverage remains at the callsite of the macro, so
we lose some detail, but there isn't a perfect choice with macros.

Often macro implementations are split across the macro and the callsite,
and there doesn't appear to be a single "right choice" for which body
should be covered. For the current implementation, we can't do both.

The callsite is most likely to be the preferred site for coverage.

r? `@tmandry`
cc: `@wesleywiser`

3 years agoRollup merge of #84875 - richkadel:no-coverage-dont-check-unused, r=tmandry
Yuki Okushi [Fri, 7 May 2021 06:20:25 +0000 (15:20 +0900)]
Rollup merge of #84875 - richkadel:no-coverage-dont-check-unused, r=tmandry

Removes unneeded check of `#[no_coverage]` in mapgen

There is an anticipated feature request to support a compiler flag that
only adds coverage for specific files (or perhaps mods). As I thought
about where that change would need to be supported, I realized that
checking the attribute in mapgen (for unused functions) was unnecessary.
The unused functions are only synthesized if they have MIR coverage, and
functions with the `no_coverage` attribute will not have been
instrumented with MIR coverage statements in the first place.

New tests confirm this.

Also, while adding tests, I updated resolved comments and FIXMEs in
other tests, and expanded comments and tests on one remaining issue that
is still not resolved.

r? `@tmandry`
cc: `@wesleywiser`

3 years agoRollup merge of #84815 - richkadel:coverage-docs-update-2021-05, r=tmandry
Yuki Okushi [Fri, 7 May 2021 06:20:24 +0000 (15:20 +0900)]
Rollup merge of #84815 - richkadel:coverage-docs-update-2021-05, r=tmandry

Update coverage docs and command line help

r? `@tmandry`
cc: `@wesleywiser`

3 years agoRollup merge of #84787 - klensy:deps-bump, r=Mark-Simulacrum
Yuki Okushi [Fri, 7 May 2021 06:20:23 +0000 (15:20 +0900)]
Rollup merge of #84787 - klensy:deps-bump, r=Mark-Simulacrum

bump deps

openssl vulns:
https://rustsec.org/advisories/RUSTSEC-2021-0056.html
https://rustsec.org/advisories/RUSTSEC-2021-0055.html

openssl-src v111.12.0+1.1.1h -> v111.15.0+1.1.1k

not latest, but newer
openssl-sys v0.9.58 -> v0.9.61
openssl v0.10.30 -> v0.10.33

curl vulns: https://curl.se/docs/vuln-7.74.0.html

curl v0.4.34 -> v0.4.36
curl-sys v0.4.39+curl-7.74.0 -> v0.4.42+curl-7.76.0

3 years agoRollup merge of #84781 - jyn514:check-bootstrap, r=Mark-Simulacrum
Yuki Okushi [Fri, 7 May 2021 06:20:22 +0000 (15:20 +0900)]
Rollup merge of #84781 - jyn514:check-bootstrap, r=Mark-Simulacrum

Don't check bootstrap artifacts by default

Bootstrap has to build successfully or this won't run, so all it checks
are the tests, which are uncommon to change.

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

3 years agoRollup merge of #84779 - jyn514:cargotest-args, r=Mark-Simulacrum
Yuki Okushi [Fri, 7 May 2021 06:20:21 +0000 (15:20 +0900)]
Rollup merge of #84779 - jyn514:cargotest-args, r=Mark-Simulacrum

Add support for --test-args to cargotest

This allows running a single test without having to wait for all tests
to complete.

Closes https://github.com/rust-lang/rust/issues/77260.

3 years agoAuto merge of #85014 - Dylan-DPC:rollup-jzpbkdu, r=Dylan-DPC
bors [Fri, 7 May 2021 01:16:08 +0000 (01:16 +0000)]
Auto merge of #85014 - Dylan-DPC:rollup-jzpbkdu, r=Dylan-DPC

Rollup of 11 pull requests

Successful merges:

 - #84409 (Ensure TLS destructors run before thread joins in SGX)
 - #84500 (Add --run flag to compiletest)
 - #84728 (Add test for suggestion to borrow unsized function parameters)
 - #84734 (Add `needs-unwind` and beginning of support for testing `panic=abort` std to compiletest)
 - #84755 (Allow using `core::` in intra-doc links within core itself)
 - #84871 (Disallows `#![feature(no_coverage)]` on stable and beta (using standard crate-level gating))
 - #84872 (Wire up tidy dependency checks for cg_clif)
 - #84896 (Handle incorrect placement of parentheses in trait bounds more gracefully)
 - #84905 (CTFE engine: rename copy → copy_intrinsic, move to intrinsics.rs)
 - #84953 (Remove unneeded call to with_default_session_globals in rustdoc highlight)
 - #84987 (small nits)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

3 years agoRollup merge of #84987 - lcnr:nits, r=Mark-Simulacrum
Dylan DPC [Thu, 6 May 2021 22:38:45 +0000 (00:38 +0200)]
Rollup merge of #84987 - lcnr:nits, r=Mark-Simulacrum

small nits

3 years agoRollup merge of #84953 - GuillaumeGomez:remove-unneeded-with_default_session_globals...
Dylan DPC [Thu, 6 May 2021 22:38:44 +0000 (00:38 +0200)]
Rollup merge of #84953 - GuillaumeGomez:remove-unneeded-with_default_session_globals, r=jyn514

Remove unneeded call to with_default_session_globals in rustdoc highlight

This was the origin of the `Span` bug in https://github.com/rust-lang/rust/pull/84176.

cc `````@Aaron1011`````
r? `````@jyn514`````

3 years agoRollup merge of #84905 - RalfJung:copy, r=oli-obk
Dylan DPC [Thu, 6 May 2021 22:38:43 +0000 (00:38 +0200)]
Rollup merge of #84905 - RalfJung:copy, r=oli-obk

CTFE engine: rename copy → copy_intrinsic, move to intrinsics.rs

The `copy` name is confusing for this function because we also have `copy_op` which is pretty different. I hope `copy_intrinsic` is clearer. Also `step.rs` should really just contain the main loop and opcode dispatch, so move this helper function to a more appropriate place.

r? ``````@oli-obk``````

3 years agoRollup merge of #84896 - estebank:issue-84772, r=jackh726
Dylan DPC [Thu, 6 May 2021 22:38:42 +0000 (00:38 +0200)]
Rollup merge of #84896 - estebank:issue-84772, r=jackh726

Handle incorrect placement of parentheses in trait bounds more gracefully

Fix #84772.

CC ``````@jonhoo``````

3 years agoRollup merge of #84872 - bjorn3:cg_clif_tidy, r=Mark-Simulacrum
Dylan DPC [Thu, 6 May 2021 22:38:41 +0000 (00:38 +0200)]
Rollup merge of #84872 - bjorn3:cg_clif_tidy, r=Mark-Simulacrum

Wire up tidy dependency checks for cg_clif

Also contains a fix and improvement to tidy.

Required for https://github.com/rust-lang/rust/pull/81746.

3 years agoRollup merge of #84871 - richkadel:no-coverage-unstable-only, r=nagisa
Dylan DPC [Thu, 6 May 2021 22:38:40 +0000 (00:38 +0200)]
Rollup merge of #84871 - richkadel:no-coverage-unstable-only, r=nagisa

Disallows `#![feature(no_coverage)]` on stable and beta (using standard crate-level gating)

Fixes: #84836
Removes the function-level feature gating solution originally implemented, and solves the same problem using `allow_internal_unstable`, so normal crate-level feature gating mechanism can still be used (which disallows the feature on stable and beta).

I tested this, building the compiler with and without `CFG_DISABLE_UNSTABLE_FEATURES=1`

With unstable features disabled, I get the expected result as shown here:

```shell
$ ./build/x86_64-unknown-linux-gnu/stage1/bin/rustc     src/test/run-make-fulldeps/coverage/no_cov_crate.rs
error[E0554]: `#![feature]` may not be used on the dev release channel
 --> src/test/run-make-fulldeps/coverage/no_cov_crate.rs:2:1
  |
2 | #![feature(no_coverage)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0554`.
```

r? ````@Mark-Simulacrum````
cc: ````@tmandry```` ````@wesleywiser````

3 years agoRollup merge of #84755 - jyn514:core-links, r=kennytm
Dylan DPC [Thu, 6 May 2021 22:38:38 +0000 (00:38 +0200)]
Rollup merge of #84755 - jyn514:core-links, r=kennytm

Allow using `core::` in intra-doc links within core itself

I came up with this idea ages ago, but rustdoc used to ICE on it. Now it doesn't.

Helps with https://github.com/rust-lang/rust/issues/73445. Doesn't fix it completely since `extern crate self as std;` in std still gives strange errors.

3 years agoRollup merge of #84734 - tmandry:compiletest-needs-unwind, r=Mark-Simulacrum
Dylan DPC [Thu, 6 May 2021 22:38:37 +0000 (00:38 +0200)]
Rollup merge of #84734 - tmandry:compiletest-needs-unwind, r=Mark-Simulacrum

Add `needs-unwind` and beginning of support for testing `panic=abort` std to compiletest

For the Fuchsia platform we build libstd with `panic=abort` and would like a way to run tests with that enabled. This adds low-level support for this directly to compiletest.

In the future I'd like to add high-level support in rustbuild, e.g. having target-specific flags that allow configuring a panic strategy. (Side note: It would be nice if we could also build multiple configurations for the same target, but I'm getting ahead of myself.)

This plus #84500 have everything that's needed to get ui tests passing on fuchsia targets.

Part of #84766. Note that this change only includes the header on tests which need an unwinder to _build_, not those which need it to _run_.

r? ````@Mark-Simulacrum````

3 years agoRollup merge of #84728 - camelid:sized-param-sugg-test, r=Mark-Simulacrum
Dylan DPC [Thu, 6 May 2021 22:38:36 +0000 (00:38 +0200)]
Rollup merge of #84728 - camelid:sized-param-sugg-test, r=Mark-Simulacrum

Add test for suggestion to borrow unsized function parameters

Closes #82820.

This is a regression test for #82820.

This test case is included in more general tests, but I think the error
regressed because there were a bunch of other diagnostic changes in the
test that obscured this regression.

Hopefully, having a test specific to the suggestion, and running rustfix
for the test, will prevent this error from regressing in the future.

3 years agoRollup merge of #84500 - tmandry:compiletest-run-flag, r=Mark-Simulacrum
Dylan DPC [Thu, 6 May 2021 22:38:35 +0000 (00:38 +0200)]
Rollup merge of #84500 - tmandry:compiletest-run-flag, r=Mark-Simulacrum

Add --run flag to compiletest

This controls whether run-* tests actually get run.

r? ```@Mark-Simulacrum```

3 years agoRollup merge of #84409 - mzohreva:mz/tls-dtors-before-join, r=jethrogb
Dylan DPC [Thu, 6 May 2021 22:38:33 +0000 (00:38 +0200)]
Rollup merge of #84409 - mzohreva:mz/tls-dtors-before-join, r=jethrogb

Ensure TLS destructors run before thread joins in SGX

The excellent test is from ```@jethrogb```

For context see: https://github.com/rust-lang/rust/pull/83416#discussion_r617282907

3 years agoAuto merge of #84806 - Mark-Simulacrum:try-start-entry, r=cjgillot
bors [Thu, 6 May 2021 22:35:06 +0000 (22:35 +0000)]
Auto merge of #84806 - Mark-Simulacrum:try-start-entry, r=cjgillot

Streamline try_start code

This shifts some branches around and avoids interleaving parallel and
non-parallel versions of the function too much.

3 years agoAuto merge of #79930 - tgnottingham:bufwriter_performance, r=m-ou-se
bors [Thu, 6 May 2021 20:04:32 +0000 (20:04 +0000)]
Auto merge of #79930 - tgnottingham:bufwriter_performance, r=m-ou-se

Optimize BufWriter

3 years agoRemoves unneeded check of `#[no_coverage]` in mapgen
Rich Kadel [Mon, 3 May 2021 18:23:40 +0000 (11:23 -0700)]
Removes unneeded check of `#[no_coverage]` in mapgen

And adds tests to validate it still works.

There is an anticipated feature request to support a compiler flag that
only adds coverage for specific files (or perhaps mods). As I thought
about where that change would need to be supported, I realized that
checking the attribute in mapgen (for unused functions) was unnecessary.
The unused functions are only synthesized if they have MIR coverage, and
functions with the `no_coverage` attribute will not have been
instrumented with MIR coverage statements in the first place.

New tests confirm this.

Also, while adding tests, I updated resolved comments and FIXMEs in
other tests.

3 years agoRenamed compiler-flags file to name of compiler-flag: instrument-coverage
Rich Kadel [Thu, 6 May 2021 19:21:24 +0000 (12:21 -0700)]
Renamed compiler-flags file to name of compiler-flag: instrument-coverage

And redirect users from the old file name.

3 years agoUpdate coverage docs and command line help
Rich Kadel [Mon, 3 May 2021 01:25:57 +0000 (18:25 -0700)]
Update coverage docs and command line help

3 years agoAdd test for suggestion to borrow unsized function parameters
Camelid [Thu, 29 Apr 2021 23:22:31 +0000 (16:22 -0700)]
Add test for suggestion to borrow unsized function parameters

This is a regression test for #82820.

This test case is included in more general tests, but I think the error
regressed because there were a bunch of other diagnostic changes in the
test that obscured this regression.

Hopefully, having a test specific to the suggestion, and running rustfix
for the test, will prevent this error from regressing in the future.

3 years agoCoverage instruments closure bodies in macros (not the macro body)
Rich Kadel [Tue, 4 May 2021 06:21:24 +0000 (23:21 -0700)]
Coverage instruments closure bodies in macros (not the macro body)

Fixes: #84884
This solution might be considered a compromise, but I think it is the
better choice.

The results in the `closure.rs` test correctly resolve all test cases
broken as described in #84884.

One test pattern (in both `closure_macro.rs` and
`closure_macro_async.rs`) was also affected, and removes coverage
statistics for the lines inside the closure, because the closure
includes a macro. (The coverage remains at the callsite of the macro, so
we lose some detail, but there isn't a perfect choice with macros.

Often macro implementations are split across the macro and the callsite,
and there doesn't appear to be a single "right choice" for which body
should be covered. For the current implementation, we can't do both.

The callsite is most likely to be the preferred site for coverage.

I applied this fix to all `MacroKinds`, not just `Bang`.

I'm trying to resolve an issue of lost coverage in a
`MacroKind::Attr`-based, function-scoped macro. Instead of only
searching for a body_span that is "not a function-like macro" (that is,
MacroKind::Bang), I'm expanding this to all `MacroKind`s. Maybe I should
expand this to `ExpnKind::Desugaring` and `ExpnKind::AstPass` (or
subsets, depending on their sub-kinds) as well, but I'm not sure that's
a good idea.

I'd like to add a test of the `Attr` macro on functions, but I need time
to figure out how to constract a good, simple example without external
crate dependencies. For the moment, all tests still work as expected (no
change), this new commit shouldn't have a negative affect, and more
importantly, I believe it will have a positive effect. I will try to
confirm this.

3 years agoAuto merge of #84559 - jackh726:issue-84398, r=nikomatsakis
bors [Thu, 6 May 2021 17:42:32 +0000 (17:42 +0000)]
Auto merge of #84559 - jackh726:issue-84398, r=nikomatsakis

Deduplicate ParamCandidates with the same value except for bound vars

Fixes #84398

This is kind of a hack. I wonder if we can get other types of candidates that are the same except for bound vars. This won't be a problem with Chalk, since we don't really need to know that there are two different "candidates" if they both give the same final substitution.

r? `@nikomatsakis`

3 years agojoin_orders_after_tls_destructors: ensure thread 2 is launched before thread 1 enters...
Mohsen Zohrevandi [Thu, 6 May 2021 16:36:26 +0000 (09:36 -0700)]
join_orders_after_tls_destructors: ensure thread 2 is launched before thread 1 enters TLS destructors

3 years agoAuto merge of #84982 - Dylan-DPC:rollup-q4cbec2, r=Dylan-DPC
bors [Thu, 6 May 2021 15:19:39 +0000 (15:19 +0000)]
Auto merge of #84982 - Dylan-DPC:rollup-q4cbec2, r=Dylan-DPC

Rollup of 8 pull requests

Successful merges:

 - #83507 (Implement RFC 2951: Native link modifiers)
 - #84328 (Stablize {HashMap,BTreeMap}::into_{keys,values})
 - #84712 (Simplify chdir implementation and minimize unsafe block)
 - #84851 (:arrow_up: rust-analyzer)
 - #84923 (Only compute Obligation `cache_key` once  in `register_obligation_at`)
 - #84945 (E0583: Include secondary path in error message)
 - #84949 (Fix typo in `MaybeUninit::array_assume_init` safety comment)
 - #84950 (Revert PR 83866)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

3 years agoSort rustdoc-gui tests
Guillaume Gomez [Thu, 6 May 2021 14:51:04 +0000 (16:51 +0200)]
Sort rustdoc-gui tests

3 years agooutdated comment
lcnr [Thu, 6 May 2021 14:27:59 +0000 (16:27 +0200)]
outdated comment

3 years agoPick candidate with fewer bound vars
Jack Huey [Thu, 6 May 2021 14:19:51 +0000 (10:19 -0400)]
Pick candidate with fewer bound vars

3 years agoremove unused variant
lcnr [Thu, 6 May 2021 12:59:53 +0000 (14:59 +0200)]
remove unused variant

3 years agoRollup merge of #84950 - pietroalbini:revert-3478f83c0, r=Mark-Simulacrum
Dylan DPC [Thu, 6 May 2021 11:31:01 +0000 (13:31 +0200)]
Rollup merge of #84950 - pietroalbini:revert-3478f83c0, r=Mark-Simulacrum

Revert PR 83866

https://github.com/rust-lang/rust/pull/83866 caused multiple test failures when Rust's channel is changed from nightly to anything else. The PR will have to be landed again after the test suite is fixed.

The two kinds of test failures were:

* Rustdoc tests failed because the links in the generated HTML didn't point at nightly anymore, see https://github.com/rust-lang/rust/pull/84909#issuecomment-832028701
* Rustdoc UI tests failed because the links included in error messages didn't point at nightly anymore, see https://github.com/rust-lang/rust/pull/84909#issuecomment-832517722

r? ``@Mark-Simulacrum``
cc ``@jyn514``

3 years agoRollup merge of #84949 - sdroege:maybe-unint-typo, r=m-ou-se
Dylan DPC [Thu, 6 May 2021 11:31:00 +0000 (13:31 +0200)]
Rollup merge of #84949 - sdroege:maybe-unint-typo, r=m-ou-se

Fix typo in `MaybeUninit::array_assume_init` safety comment

And also add backticks around `MaybeUninit`.

3 years agoRollup merge of #84945 - fee1-dead:E0583-better-message, r=petrochenkov
Dylan DPC [Thu, 6 May 2021 11:30:59 +0000 (13:30 +0200)]
Rollup merge of #84945 - fee1-dead:E0583-better-message, r=petrochenkov

E0583: Include secondary path in error message

Fixes #84819.

3 years agoRollup merge of #84923 - estebank:as_cache_key-once, r=petrochenkov
Dylan DPC [Thu, 6 May 2021 11:30:58 +0000 (13:30 +0200)]
Rollup merge of #84923 - estebank:as_cache_key-once, r=petrochenkov

Only compute Obligation `cache_key` once  in `register_obligation_at`

3 years agoRollup merge of #84851 - lnicola:rust-analyzer-2021-05-03, r=jonas-schievink
Dylan DPC [Thu, 6 May 2021 11:30:56 +0000 (13:30 +0200)]
Rollup merge of #84851 - lnicola:rust-analyzer-2021-05-03, r=jonas-schievink

:arrow_up: rust-analyzer

3 years agoRollup merge of #84712 - joshtriplett:simplify-chdir, r=yaahc
Dylan DPC [Thu, 6 May 2021 11:30:55 +0000 (13:30 +0200)]
Rollup merge of #84712 - joshtriplett:simplify-chdir, r=yaahc

Simplify chdir implementation and minimize unsafe block

3 years agoRollup merge of #84328 - Folyd:stablize_map_into_keys_values, r=m-ou-se
Dylan DPC [Thu, 6 May 2021 11:30:54 +0000 (13:30 +0200)]
Rollup merge of #84328 - Folyd:stablize_map_into_keys_values, r=m-ou-se

Stablize {HashMap,BTreeMap}::into_{keys,values}

I would propose to stabilize `{HashMap,BTreeMap}::into_{keys,values}`( aka. `map_into_keys_values`).

Closes #75294.

3 years agoRollup merge of #83507 - luqmana:native-link-modifiers, r=petrochenkov
Dylan DPC [Thu, 6 May 2021 11:30:51 +0000 (13:30 +0200)]
Rollup merge of #83507 - luqmana:native-link-modifiers, r=petrochenkov

Implement RFC 2951: Native link modifiers

A first attempt at implementing https://github.com/rust-lang/rfcs/pull/2951 / https://github.com/rust-lang/compiler-team/issues/356.

Tracking Issue: https://github.com/rust-lang/rust/issues/81490

Introduces feature flags for the general syntax (`native_link_modifiers`) and each modifier (`native_link_modifiers_{as_needed,bundle,verbatim,whole_archive}`).

r? `@petrochenkov`

3 years agoAuto merge of #84965 - the8472:lazy-delayed-diagnostics, r=Mark-Simulacrum
bors [Thu, 6 May 2021 11:29:29 +0000 (11:29 +0000)]
Auto merge of #84965 - the8472:lazy-delayed-diagnostics, r=Mark-Simulacrum

lazify backtrace formatting for delayed diagnostics

Formatting backtraces causes debug info to be parsed, which is superfluous work if the delayed bugs get cleared later.

Lazifying them results in these speedups for the UI testsuite:

|       | debuginfo = 0 | debuginfo = 1 | debuginfo = 2 |
|-------|---------------|---------------|---------------|
| eager | 31.59s        | 37.55s        | 42.64s        |
| lazy  | 30.44s        | 30.86s        | 34.07s        |

3 years ago32bit bless
Ralf Jung [Thu, 6 May 2021 10:00:19 +0000 (12:00 +0200)]
32bit bless

3 years agouse CheckInAllocMsg::PointerArithmeticTest for ptr_offset error
Ralf Jung [Wed, 5 May 2021 22:16:27 +0000 (00:16 +0200)]
use CheckInAllocMsg::PointerArithmeticTest for ptr_offset error

3 years agoAuto merge of #84468 - iladin:iladin/fix-84467, r=petrochenkov
bors [Thu, 6 May 2021 07:02:06 +0000 (07:02 +0000)]
Auto merge of #84468 - iladin:iladin/fix-84467, r=petrochenkov

Fix#84467 linker_args with --target=sparcv9-sun-solaris

Trying to cross-compile for sparcv9-sun-solaris
getting a error message for -zignore

Introduced when -z -ignore was seperated here
22d0ab0

No formatting done

Reproduce

``` bash
rustup target add sparcv9-sun-solaris
cargo new --bin hello && cd hello && cargo run --target=sparcv9-sun-solaris
```

config.toml

[target.sparcv9-sun-solaris]
linker = "gcc"

3 years agoAuto merge of #84266 - QuiltOS:statically-disallow-global-oom-handling, r=Mark-Simulacrum
bors [Thu, 6 May 2021 04:41:20 +0000 (04:41 +0000)]
Auto merge of #84266 - QuiltOS:statically-disallow-global-oom-handling, r=Mark-Simulacrum

alloc: Add unstable Cfg feature `no-global_oom_handling

For certain sorts of systems, programming, it's deemed essential that
all allocation failures be explicitly handled where they occur. For
example, see Linus Torvald's opinion in [1]. Merely not calling global
panic handlers, or always `try_reserving` first (for vectors), is not
deemed good enough, because the mere presence of the global OOM handlers
is burdens static analysis.

One option for these projects to use rust would just be to skip `alloc`,
rolling their own allocation abstractions.  But this would, in my
opinion be a real shame. `alloc` has a few `try_*` methods already, and
we could easily have more. Features like custom allocator support also
demonstrate and existing to support diverse use-cases with the same
abstractions.

A natural way to add such a feature flag would a Cargo feature, but
there are currently uncertainties around how std library crate's Cargo
features may or not be stable, so to avoid any risk of stabilizing by
mistake we are going with a more low-level "raw cfg" token, which
cannot be interacted with via Cargo alone.

Note also that since there is no notion of "default cfg tokens" outside
of Cargo features, we have to invert the condition from
`global_oom_handling` to to `not(no_global_oom_handling)`. This breaks
the monotonicity that would be important for a Cargo feature (i.e.
turning on more features should never break compatibility), but it
doesn't matter for raw cfg tokens which are not intended to be
"constraint solved" by Cargo or anything else.

To support this use-case we create a new feature, "global-oom-handling",
on by default, and put the global OOM handler infra and everything else
it that depends on it behind it. By default, nothing is changed, but
users concerned about global handling can make sure it is disabled, and
be confident that all OOM handling is local and explicit.

For this first iteration, non-flat collections are outright disabled.
`Vec` and `String` don't yet have `try_*` allocation methods, but are
kept anyways since they can be oom-safely created "from parts", and we
hope to add those `try_` methods in the future.

[1]: https://lore.kernel.org/lkml/CAHk-=wh_sNLoz84AUUzuqXEsYH35u=8HV3vK-jbRbJ_B-JjGrg@mail.gmail.com/

3 years agoFix up/ignore failing ui tests on fuchsia
Tyler Mandry [Fri, 30 Apr 2021 04:02:05 +0000 (04:02 +0000)]
Fix up/ignore failing ui tests on fuchsia

3 years agoSupport multi target-rustcflags for -Zpanic-abort-tests
Tyler Mandry [Fri, 30 Apr 2021 04:01:04 +0000 (04:01 +0000)]
Support multi target-rustcflags for -Zpanic-abort-tests

I just need this until rustbuild supports -Cpanic=abort std directly.

3 years agoAdd needs-unwind to tests
Tyler Mandry [Thu, 29 Apr 2021 17:04:16 +0000 (17:04 +0000)]
Add needs-unwind to tests

3 years agocompiletest: Add --target-panic, needs-unwind
Tyler Mandry [Thu, 29 Apr 2021 16:57:58 +0000 (16:57 +0000)]
compiletest: Add --target-panic, needs-unwind

3 years agoE0583: Include secondary path in error message
Deadbeef [Wed, 5 May 2021 08:00:18 +0000 (16:00 +0800)]
E0583: Include secondary path in error message

3 years agoImplement RFC 2951: Native link modifiers
Luqman Aden [Thu, 25 Mar 2021 04:45:09 +0000 (21:45 -0700)]
Implement RFC 2951: Native link modifiers

This commit implements both the native linking modifiers infrastructure
as well as an initial attempt at the individual modifiers from the RFC.
It also introduces a feature flag for the general syntax along with
individual feature flags for each modifier.

3 years agolazify backtrace formatting for delayed diagnostics
The8472 [Wed, 5 May 2021 20:52:58 +0000 (22:52 +0200)]
lazify backtrace formatting for delayed diagnostics

This defers backtrace formatting to the point where we
actually want to flush delayed diagnostics. If they are discarded
before that point then we can avoid invoking the backtrace formatting
machinery which will parse debug info and symbol tables.

for debuginfo=2 this leads to a 20% walltime reduction of the UI testsuite

3 years agoalloc: Add unstable Cfg feature `no-global_oom_handling`
John Ericson [Sat, 17 Apr 2021 00:18:04 +0000 (20:18 -0400)]
alloc: Add unstable Cfg feature `no-global_oom_handling`

For certain sorts of systems, programming, it's deemed essential that
all allocation failures be explicitly handled where they occur. For
example, see Linus Torvald's opinion in [1]. Merely not calling global
panic handlers, or always `try_reserving` first (for vectors), is not
deemed good enough, because the mere presence of the global OOM handlers
is burdens static analysis.

One option for these projects to use rust would just be to skip `alloc`,
rolling their own allocation abstractions.  But this would, in my
opinion be a real shame. `alloc` has a few `try_*` methods already, and
we could easily have more. Features like custom allocator support also
demonstrate and existing to support diverse use-cases with the same
abstractions.

A natural way to add such a feature flag would a Cargo feature, but
there are currently uncertainties around how std library crate's Cargo
features may or not be stable, so to avoid any risk of stabilizing by
mistake we are going with a more low-level "raw cfg" token, which
cannot be interacted with via Cargo alone.

Note also that since there is no notion of "default cfg tokens" outside
of Cargo features, we have to invert the condition from
`global_oom_handling` to to `not(no_global_oom_handling)`. This breaks
the monotonicity that would be important for a Cargo feature (i.e.
turning on more features should never break compatibility), but it
doesn't matter for raw cfg tokens which are not intended to be
"constraint solved" by Cargo or anything else.

To support this use-case we create a new feature, "global-oom-handling",
on by default, and put the global OOM handler infra and everything else
it that depends on it behind it. By default, nothing is changed, but
users concerned about global handling can make sure it is disabled, and
be confident that all OOM handling is local and explicit.

For this first iteration, non-flat collections are outright disabled.
`Vec` and `String` don't yet have `try_*` allocation methods, but are
kept anyways since they can be oom-safely created "from parts", and we
hope to add those `try_` methods in the future.

[1]: https://lore.kernel.org/lkml/CAHk-=wh_sNLoz84AUUzuqXEsYH35u=8HV3vK-jbRbJ_B-JjGrg@mail.gmail.com/

3 years agoRemote test for alloc `extern_crate` feature.
John Ericson [Wed, 5 May 2021 20:20:39 +0000 (16:20 -0400)]
Remote test for alloc `extern_crate` feature.

This functionality was removed in
45bf1ed1a1123122ded05ae2eedaf0f190e52726, but the test was left by
mistake.

3 years agoAuto merge of #84956 - RalfJung:rollup-m70mx2n, r=RalfJung
bors [Wed, 5 May 2021 17:45:41 +0000 (17:45 +0000)]
Auto merge of #84956 - RalfJung:rollup-m70mx2n, r=RalfJung

Rollup of 11 pull requests

Successful merges:

 - #83553 (Update `ptr` docs with regards to `ptr::addr_of!`)
 - #84183 (Update RELEASES.md for 1.52.0)
 - #84709 (Add doc alias for `chdir` to `std::env::set_current_dir`)
 - #84803 (Reduce duplication in `impl_dep_tracking_hash` macros)
 - #84808 (Account for unsatisfied bounds in E0599)
 - #84843 (use else if in std library )
 - #84865 (rustbuild: Pass a `threads` flag that works to windows-gnu lld)
 - #84878 (Clarify documentation for `[T]::contains`)
 - #84882 (platform-support: Center the contents of the `std` and `host` columns)
 - #84903 (Remove `rustc_middle::mir::interpret::CheckInAllocMsg::NullPointerTest`)
 - #84913 (Do not ICE on invalid const param)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

3 years agoUpdate highlight tests
Guillaume Gomez [Wed, 5 May 2021 16:13:47 +0000 (18:13 +0200)]
Update highlight tests

3 years agoRollup merge of #84913 - estebank:issue-84831, r=varkor
Ralf Jung [Wed, 5 May 2021 15:52:29 +0000 (17:52 +0200)]
Rollup merge of #84913 - estebank:issue-84831, r=varkor

Do not ICE on invalid const param

When encountering a path that can't have generics, do not call
`generics_of`. This would happen when writing something like
`path::this_is_a_mod<const_val>`.

Fix #84831.

3 years agoRollup merge of #84903 - hyd-dev:dead-check-in-alloc-msg, r=RalfJung
Ralf Jung [Wed, 5 May 2021 15:52:28 +0000 (17:52 +0200)]
Rollup merge of #84903 - hyd-dev:dead-check-in-alloc-msg, r=RalfJung

Remove `rustc_middle::mir::interpret::CheckInAllocMsg::NullPointerTest`

Removing it per https://github.com/rust-lang/rust/pull/84842#discussion_r625589674: it's a dead enum variant.

Note that `PointerArithmeticTest` also seems dead:
```
$ rg -F PointerArithmeticTest -C5
compiler/rustc_middle/src/mir/interpret/error.rs
169-
170-/// Details of why a pointer had to be in-bounds.
171-#[derive(Debug, Copy, Clone, TyEncodable, TyDecodable, HashStable)]
172-pub enum CheckInAllocMsg {
173-    MemoryAccessTest,
174:    PointerArithmeticTest,
175-    InboundsTest,
176-}
177-
178-impl fmt::Display for CheckInAllocMsg {
179-    /// When this is printed as an error the context looks like this
--
182-        write!(
183-            f,
184-            "{}",
185-            match *self {
186-                CheckInAllocMsg::MemoryAccessTest => "memory access",
187:                CheckInAllocMsg::PointerArithmeticTest => "pointer arithmetic",
188-                CheckInAllocMsg::InboundsTest => "inbounds test",
189-            }
190-        )
191-    }
192-}
```
Not sure if that is also desirable to be removed, however.

3 years agoRollup merge of #84882 - joshtriplett:platform-support-formatting, r=Dylan-DPC
Ralf Jung [Wed, 5 May 2021 15:52:27 +0000 (17:52 +0200)]
Rollup merge of #84882 - joshtriplett:platform-support-formatting, r=Dylan-DPC

platform-support: Center the contents of the `std` and `host` columns

Minor formatting improvement.

3 years agoRollup merge of #84878 - jimblandy:contains-doc-fix, r=joshtriplett
Ralf Jung [Wed, 5 May 2021 15:52:26 +0000 (17:52 +0200)]
Rollup merge of #84878 - jimblandy:contains-doc-fix, r=joshtriplett

Clarify documentation for `[T]::contains`

Change the documentation to correctly characterize when the suggested alternative to `contains` applies, and correctly explain why it works.

Fixes #84877

3 years agoRollup merge of #84865 - petrochenkov:llthread, r=Mark-Simulacrum
Ralf Jung [Wed, 5 May 2021 15:52:25 +0000 (17:52 +0200)]
Rollup merge of #84865 - petrochenkov:llthread, r=Mark-Simulacrum

rustbuild: Pass a `threads` flag that works to windows-gnu lld

MinGW driver for COFF LLD doesn't currently translate GNU-style `--threads=N` to native `/threads:N`, so we have to pass the option in its native form to avoid an error.

Also pass the `threads` flag to lld-link (windows-msvc lld) as well.

3 years agoRollup merge of #84843 - wcampbell0x2a:use-else-if-let, r=dtolnay
Ralf Jung [Wed, 5 May 2021 15:52:24 +0000 (17:52 +0200)]
Rollup merge of #84843 - wcampbell0x2a:use-else-if-let, r=dtolnay

use else if in std library

Decreases indentation and improves readability

3 years agoRollup merge of #84808 - estebank:issue-84769, r=petrochenkov
Ralf Jung [Wed, 5 May 2021 15:52:23 +0000 (17:52 +0200)]
Rollup merge of #84808 - estebank:issue-84769, r=petrochenkov

Account for unsatisfied bounds in E0599

Fix #84769, follow up to #84499, #83667.

3 years agoRollup merge of #84803 - jyn514:duplicate-macros, r=petrochenkov
Ralf Jung [Wed, 5 May 2021 15:52:22 +0000 (17:52 +0200)]
Rollup merge of #84803 - jyn514:duplicate-macros, r=petrochenkov

Reduce duplication in `impl_dep_tracking_hash` macros

Cherry-picked from https://github.com/rust-lang/rust/pull/84234 since it will be a while until it lands.

3 years agoRollup merge of #84709 - joshtriplett:doc-alias-chdir, r=dtolnay
Ralf Jung [Wed, 5 May 2021 15:52:20 +0000 (17:52 +0200)]
Rollup merge of #84709 - joshtriplett:doc-alias-chdir, r=dtolnay

Add doc alias for `chdir` to `std::env::set_current_dir`

Searching for `chdir` in the Rust documentation produces no useful
results.

I wrote some code recently that called `libc::chdir` and manually
handled errors, because I didn't realize that the safe
`std::env::set_current_dir` existed. I searched for `chdir` and
`change_dir` and `change_directory` (the latter two based on the
precedent of unabbreviating set by `create_dir`), and I also read
through `std::fs` expecting to potentially find it there. Given that
none of those led to `std::env::set_current_dir`, I think that provides
sufficient justification to add this specific alias.

3 years agoRollup merge of #84183 - rust-lang:relnotes-1.52.0, r=pietroalbini
Ralf Jung [Wed, 5 May 2021 15:52:19 +0000 (17:52 +0200)]
Rollup merge of #84183 - rust-lang:relnotes-1.52.0, r=pietroalbini

Update RELEASES.md for 1.52.0

### [Rendered](https://github.com/rust-lang/rust/blob/relnotes-1.52.0/RELEASES.md)

r? ````````@Mark-Simulacrum````````
cc ````````@rust-lang/release````````

3 years agoRollup merge of #83553 - jfrimmel:addr-of, r=m-ou-se
Ralf Jung [Wed, 5 May 2021 15:52:18 +0000 (17:52 +0200)]
Rollup merge of #83553 - jfrimmel:addr-of, r=m-ou-se

Update `ptr` docs with regards to `ptr::addr_of!`

This updates the documentation since `ptr::addr_of!` and `ptr::addr_of_mut!` are now stable. One might remove the distinction between the sections `# On packed structs` and `# Examples`, as the old section on packed structs was primarily to prevent users of doing undefined behavior, which is not necessary anymore.

Technically there is now wrong/outdated documentation on stable, but I don't think this is worth a point release 😉

Fixes #83509.

``````````@rustbot`````````` modify labels: T-doc

3 years agoRemove unneeded call to with_default_session_globals in rustdoc highlight
Guillaume Gomez [Wed, 5 May 2021 15:28:18 +0000 (17:28 +0200)]
Remove unneeded call to with_default_session_globals in rustdoc highlight

3 years agoDisallows `#![feature(no_coverage)]` on stable and beta
Rich Kadel [Mon, 3 May 2021 15:47:43 +0000 (08:47 -0700)]
Disallows `#![feature(no_coverage)]` on stable and beta

using allow_internal_unstable (as recommended)

Fixes: #84836
```shell
$ ./build/x86_64-unknown-linux-gnu/stage1/bin/rustc     src/test/run-make-fulldeps/coverage/no_cov_crate.rs
error[E0554]: `#![feature]` may not be used on the dev release channel
 --> src/test/run-make-fulldeps/coverage/no_cov_crate.rs:2:1
  |
2 | #![feature(no_coverage)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0554`.
```

3 years agoBump map_into_keys_values stable version to 1.54.0.
Mara Bos [Wed, 5 May 2021 14:40:06 +0000 (16:40 +0200)]
Bump map_into_keys_values stable version to 1.54.0.

3 years agoAuto merge of #84200 - CDirkx:os, r=m-ou-se
bors [Wed, 5 May 2021 14:15:19 +0000 (14:15 +0000)]
Auto merge of #84200 - CDirkx:os, r=m-ou-se

Move all `sys::ext` modules to `os`

This PR moves all `sys::ext` modules to `os`, centralizing the location of all `os` code and simplifying the dependencies between `os` and `sys`.

Because this also removes all uses `cfg_if!` on publicly exported items, where after #81969 there were still a few left, this should properly work around https://github.com/rust-analyzer/rust-analyzer/issues/6038.

`@rustbot` label: +T-libs-impl

3 years agoRevert PR 83866
Pietro Albini [Wed, 5 May 2021 09:57:10 +0000 (11:57 +0200)]
Revert PR 83866

That PR caused multiple test failures when Rust's channel is changed
from nightly to anything else. The commit will have to be landed again
after the test suite is fixed.

3 years agoAuto merge of #84886 - Xanewok:update-rls-and-rustfmt, r=Xanewok
bors [Wed, 5 May 2021 11:05:27 +0000 (11:05 +0000)]
Auto merge of #84886 - Xanewok:update-rls-and-rustfmt, r=Xanewok

Update RLS and Rustfmt

Closes #84537. Closes #84538.

I know there's https://github.com/rust-lang/rust/pull/82208 in progress but I'm not sure which we want to land first.

Also, I'm getting Rustfmt test failures due to inner attributes not permitted:
<details>

```
error: an inner attribute is not permitted in this context
 --> tests/target/issue-3592.rs:4:13
  |
4 |             #![cfg(unix)]
  |             ^^^^^^^^^^^^^
  |
  = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.

error: an inner attribute is not permitted in this context
 --> tests/target/issue-3592.rs:8:13
  |
8 |             #![cfg(not(unix))]
  |             ^^^^^^^^^^^^^^^^^^
  |
  = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.

error: an inner attribute is not permitted in this context
   --> tests/source/match.rs:413:9
    |
413 |         #![allow(simple_match)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.

error: an inner attribute is not permitted in this context
   --> tests/target/match.rs:444:9
    |
444 |         #![allow(simple_match)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.

test test::system_tests ... FAILED
test test::idempotence_tests ... FAILED
```

</details>

but let's see what CI says, first.

cc `@calebcartwright`

3 years agoAdd `yansi-term` as a permitted dependency
Joshua Nelson [Sun, 2 May 2021 19:06:24 +0000 (15:06 -0400)]
Add `yansi-term` as a permitted dependency

3 years agoUpdate RLS and Rustfmt
Igor Matuszewski [Mon, 3 May 2021 20:59:35 +0000 (22:59 +0200)]
Update RLS and Rustfmt

3 years agoFix typo in `MaybeUninit::array_assume_init` safety comment
Sebastian Dröge [Wed, 5 May 2021 09:31:38 +0000 (12:31 +0300)]
Fix typo in `MaybeUninit::array_assume_init` safety comment

And also add backticks around `MaybeUninit`.

3 years agoAuto merge of #84794 - ChrisDenton:dedup-native-libs, r=petrochenkov
bors [Wed, 5 May 2021 03:56:26 +0000 (03:56 +0000)]
Auto merge of #84794 - ChrisDenton:dedup-native-libs, r=petrochenkov

Deduplicate native libs before they are passed to the linker

Stop spamming the linker with the same native library over and over again, if they directly follow from each other. This would help prevent [this situation](https://github.com/MSxDOS/ntapi/issues/2).

Issue #38460 has been open since 2016 so I think it's worth making an incomplete fix that at least addresses the most common symptom and without otherwise changing how Rust handles native libs. This PR is intended to be easy to revert (if necessary) when a more permanent fix is implemented.

3 years agoAuto merge of #84915 - Mark-Simulacrum:bitset-xor-eq, r=jackh726
bors [Wed, 5 May 2021 01:23:01 +0000 (01:23 +0000)]
Auto merge of #84915 - Mark-Simulacrum:bitset-xor-eq, r=jackh726

Retain data in vectorized registers for longer

This seems to be a mild performance improvement on the keccak crate at least, though not sure it'll show up more broadly.

3 years agoAuto merge of #84707 - Stupremee:remove-fake-defids-in-rustdoc, r=jyn514,GuillaumeGomez
bors [Tue, 4 May 2021 20:56:49 +0000 (20:56 +0000)]
Auto merge of #84707 - Stupremee:remove-fake-defids-in-rustdoc, r=jyn514,GuillaumeGomez

Get rid of fake `DefId`s in rustdoc

Right now there are *many* errors left, but I wanted to show the current state since all that is left to do is fixing the errors.

Resolves #83183

r? `@jyn514`

3 years agoOnly compute Obligation `cache_key` once in `register_obligation_at`
Esteban Küber [Tue, 4 May 2021 18:57:53 +0000 (11:57 -0700)]
Only compute Obligation `cache_key` once  in `register_obligation_at`

3 years agoAuto merge of #84900 - hyd-dev:miri, r=RalfJung
bors [Tue, 4 May 2021 18:35:08 +0000 (18:35 +0000)]
Auto merge of #84900 - hyd-dev:miri, r=RalfJung

Update Miri

This should fix #84848.

r? `@RalfJung`

3 years agoAdd type to differentiate between fake and real DefId's
Justus K [Thu, 29 Apr 2021 19:36:54 +0000 (21:36 +0200)]
Add type to differentiate between fake and real DefId's

3 years agoChange bitwise operator to more easily keep data in vector registers
Mark Rousskov [Tue, 4 May 2021 15:53:57 +0000 (11:53 -0400)]
Change bitwise operator to more easily keep data in vector registers

3 years agoDo not ICE on invalid const param
Esteban Küber [Tue, 4 May 2021 15:41:40 +0000 (08:41 -0700)]
Do not ICE on invalid const param

When encountering a path that can't have generics, do not call
`generics_of`. This would happen when writing something like
`path::this_is_a_mod<const_val>`.

Fix #84831.

3 years agoRetry clang+llvm download
Mark Rousskov [Tue, 4 May 2021 15:07:16 +0000 (11:07 -0400)]
Retry clang+llvm download

We've been seeing a pretty high rate of spurious network failures (e.g., openssl
connection reset by peer). Not clear why, but let's add a retry.

3 years agoAuto merge of #84894 - joshtriplett:clang-12, r=Mark-Simulacrum
bors [Tue, 4 May 2021 15:03:50 +0000 (15:03 +0000)]
Auto merge of #84894 - joshtriplett:clang-12, r=Mark-Simulacrum

Update clang to 12.0.0 on Windows and macOS

Needed for https://github.com/rust-lang/rust/pull/84764 . Tarballs
already uploaded to the CI mirror bucket.

3 years agoCTFE engine: rename copy → copy_intrinsic, move to intrinsics.rs
Ralf Jung [Tue, 4 May 2021 11:43:50 +0000 (13:43 +0200)]
CTFE engine: rename copy → copy_intrinsic, move to intrinsics.rs

3 years agoAuto merge of #84017 - Smittyvb:int-literal-underscores, r=jyn514
bors [Tue, 4 May 2021 10:42:13 +0000 (10:42 +0000)]
Auto merge of #84017 - Smittyvb:int-literal-underscores, r=jyn514

Valid underscores in hex/octal/binary literal docs

Currently hex/octal/binary literals with computed values are displayed like `0_xff_fff_fffu32`, which is invalid since underscores can't be in the middle of integer prefixes. This properly formats prefixed integers.

This causes  [`std::u32::MAX`](https://doc.rust-lang.org/std/u32/constant.MAX.html) to be displayed as
```rust
pub const MAX: u32 = u32::MAX; // 0_xff_fff_fffu32
```

This PR changes it to be displayed as:
```rust
pub const MAX: u32 = u32::MAX; // 0xffff_ffffu32
```

3 years agoRemove `rustc_middle::mir::interpret::CheckInAllocMsg::NullPointerTest`
hyd-dev [Tue, 4 May 2021 10:27:02 +0000 (18:27 +0800)]
Remove `rustc_middle::mir::interpret::CheckInAllocMsg::NullPointerTest`

3 years agoUpdate Miri
hyd-dev [Tue, 4 May 2021 09:07:39 +0000 (17:07 +0800)]
Update Miri

3 years agoAuto merge of #83213 - rylev:update-lints-to-errors, r=nikomatsakis
bors [Tue, 4 May 2021 08:09:23 +0000 (08:09 +0000)]
Auto merge of #83213 - rylev:update-lints-to-errors, r=nikomatsakis

Update BARE_TRAIT_OBJECT and ELLIPSIS_INCLUSIVE_RANGE_PATTERNS to errors in Rust 2021

This addresses https://github.com/rust-lang/rust/pull/81244 by updating two lints to errors in the Rust 2021 edition.

r? `@estebank`

3 years agoHandle incorrect placement of parentheses in trait bounds more gracefully
Esteban Küber [Tue, 4 May 2021 06:48:56 +0000 (23:48 -0700)]
Handle incorrect placement of parentheses in trait bounds more gracefully

Fix #84772.

3 years agoUpdate clang to 12.0.0 on Windows and macOS
Josh Triplett [Tue, 4 May 2021 05:54:50 +0000 (22:54 -0700)]
Update clang to 12.0.0 on Windows and macOS

Needed for https://github.com/rust-lang/rust/pull/84764 . Tarballs
already uploaded to the CI mirror bucket.

3 years agoAuto merge of #84874 - joshtriplett:ci-extract-llvm-win64-installer, r=Mark-Simulacrum
bors [Tue, 4 May 2021 05:40:24 +0000 (05:40 +0000)]
Auto merge of #84874 - joshtriplett:ci-extract-llvm-win64-installer, r=Mark-Simulacrum

CI: Extract LLVM win64 installer directly, using 7z

Currently, we have LLVM tarballs for win64, generated by someone running
the installer via wine and tarring up the result.

7z knows how to extract NSIS installers directly, and the result is
identical to our tarball, except that it doesn't include `Uninstall.exe`
(which we don't care about) and it includes the NSIS plugin directory
(which we also don't care about).

This simplifies the process of upgrading CI, and allows us to just
mirror the upstream release .exe directly. This also improves our
supply chain.

3 years agoAuto merge of #84833 - Mark-Simulacrum:thread-local-consts, r=varkor
bors [Tue, 4 May 2021 03:14:32 +0000 (03:14 +0000)]
Auto merge of #84833 - Mark-Simulacrum:thread-local-consts, r=varkor

"const" initialized thread locals in rustc

This appears to give a slight speedup on many of our benchmarks.