]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoAuto merge of #73971 - ssomers:slice_slasher, r=Mark-Simulacrum
bors [Wed, 9 Sep 2020 17:40:46 +0000 (17:40 +0000)]
Auto merge of #73971 - ssomers:slice_slasher, r=Mark-Simulacrum

BTreeMap mutable iterators should not take any reference to visited nodes during iteration

Fixes #73915, overlapping mutable references during BTreeMap iteration

r? `@RalfJung`

3 years agoAuto merge of #76445 - jyn514:doctests, r=Mark-Simulacrum,ollie27
bors [Wed, 9 Sep 2020 13:33:01 +0000 (13:33 +0000)]
Auto merge of #76445 - jyn514:doctests, r=Mark-Simulacrum,ollie27

Make rustdoc output deterministic for UI tests

Closes https://github.com/rust-lang/rust/issues/76442 (hopefully, since it's non-deterministic I don't have a way to test).

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

3 years agoBTreeMap: avoid aliasing by avoiding slices
Stein Somers [Sun, 16 Aug 2020 17:07:30 +0000 (19:07 +0200)]
BTreeMap: avoid aliasing by avoiding slices

3 years agomake as_leaf return a raw pointer, to reduce aliasing assumptions
Ralf Jung [Thu, 2 Jul 2020 08:36:56 +0000 (10:36 +0200)]
make as_leaf return a raw pointer, to reduce aliasing assumptions

3 years agoAuto merge of #76513 - rust-lang:rust-analyzer-2020-09-09, r=jonas-schievink
bors [Wed, 9 Sep 2020 11:28:17 +0000 (11:28 +0000)]
Auto merge of #76513 - rust-lang:rust-analyzer-2020-09-09, r=jonas-schievink

:arrow_up: rust-analyzer

r? `@ghost`

3 years ago:arrow_up: rust-analyzer
Jonas Schievink [Wed, 9 Sep 2020 10:41:32 +0000 (12:41 +0200)]
:arrow_up: rust-analyzer

3 years agoAuto merge of #76406 - GuillaumeGomez:create-e0774, r=pickfire,jyn514
bors [Wed, 9 Sep 2020 08:23:33 +0000 (08:23 +0000)]
Auto merge of #76406 - GuillaumeGomez:create-e0774, r=pickfire,jyn514

Create E0774

3 years agoAuto merge of #76463 - camelid:improve-E0607-explanation, r=jyn514
bors [Wed, 9 Sep 2020 06:33:03 +0000 (06:33 +0000)]
Auto merge of #76463 - camelid:improve-E0607-explanation, r=jyn514

Improve wording of E0607 explanation

`@rustbot` modify labels: A-diagnostics C-enhancement

3 years agoAuto merge of #76453 - camelid:fix-css-crate-list, r=GuillaumeGomez,ollie27
bors [Wed, 9 Sep 2020 04:35:40 +0000 (04:35 +0000)]
Auto merge of #76453 - camelid:fix-css-crate-list, r=GuillaumeGomez,ollie27

rustdoc: Fix font CSS for crate lists

I had put it in the wrong file in #76126. This should fix it now. Thank
you to `@ollie27` for pointing this out!

---

`@rustbot` modify labels: T-rustdoc C-bug

3 years agoAuto merge of #76418 - jyn514:readme, r=Dylan-DPC
bors [Wed, 9 Sep 2020 02:40:27 +0000 (02:40 +0000)]
Auto merge of #76418 - jyn514:readme, r=Dylan-DPC

Move sections about contributing closer together in the README

This makes it easier to find what to do if you're interested in contributing.

3 years agoAuto merge of #76502 - Dylan-DPC:rollup-2c4zz0t, r=Dylan-DPC
bors [Wed, 9 Sep 2020 00:08:13 +0000 (00:08 +0000)]
Auto merge of #76502 - Dylan-DPC:rollup-2c4zz0t, r=Dylan-DPC

Rollup of 10 pull requests

Successful merges:

 - #76162 (Make duration_since documentation more clear)
 - #76355 (remove public visibility previously needed for rustfmt)
 - #76374 (Improve ayu doc source line number contrast)
 - #76379 (rustbuild: Remove `Mode::Codegen`)
 - #76389 (Fix HashMap visualizers in Visual Studio (Code))
 - #76396 (Fix typo in tracking issue template)
 - #76401 (Add help note to unconstrained const parameter)
 - #76402 (Update linker-plugin-lto.md to contain up to rust 1.46)
 - #76403 (Fix documentation for TyCtxt::all_impls)
 - #76498 (Update cargo)

Failed merges:

 - #76458 (Add drain_filter method to HashMap and HashSet)

r? `@ghost`

3 years agoRollup merge of #76498 - ehuss:update-cargo, r=ehuss
Dylan DPC [Tue, 8 Sep 2020 23:35:26 +0000 (01:35 +0200)]
Rollup merge of #76498 - ehuss:update-cargo, r=ehuss

Update cargo

8 commits in 126907a7cfccbe93778530e6a6bbaa3adb6c515c..875e0123259b0b6299903fe4aea0a12ecde9324f
2020-08-31 20:42:11 +0000 to 2020-09-08 20:17:21 +0000
- Lowercase and remove periods in error messages for consistency (rust-lang/cargo#8655)
- Allow running build-man.sh from any directory (rust-lang/cargo#8682)
- docs: add details for cargo check pass where cargo build fail (rust-lang/cargo#8677)
- Fix nightly exported_priv_warning test. (rust-lang/cargo#8678)
- fix mdbook test with ```ignore/text/sh/console (rust-lang/cargo#8674)
- End CACHEDIR.TAG with newline (rust-lang/cargo#8672)
- Fixed the fossil repo initialization actually run commands (rust-lang/cargo#8671)
- Remove asciidoc attribute in cargo-metadata man page. (rust-lang/cargo#8670)

3 years agoRollup merge of #76403 - scileo:doc-all-impls, r=lcnr
Dylan DPC [Tue, 8 Sep 2020 23:35:23 +0000 (01:35 +0200)]
Rollup merge of #76403 - scileo:doc-all-impls, r=lcnr

Fix documentation for TyCtxt::all_impls

`TyCtxt::all_impls` documentation was wrong about the return type.

3 years agoRollup merge of #76402 - elichai:patch-2, r=wesleywiser
Dylan DPC [Tue, 8 Sep 2020 23:35:22 +0000 (01:35 +0200)]
Rollup merge of #76402 - elichai:patch-2, r=wesleywiser

Update linker-plugin-lto.md to contain up to rust 1.46

Hi,
this is the same as https://github.com/rust-lang/rust/pull/72290, if anyone has suggestions on how to automate this please say :)
otherwise, you can check the versions I've added via:

```sh
$ rustup install 1.44.0
$ rustc +1.44.0 -Vv
rustc 1.44.0 (49cae5576 2020-06-01)
binary: rustc
commit-hash: 49cae55760da0a43428eba73abcb659bb70cf2e4
commit-date: 2020-06-01
host: x86_64-unknown-linux-gnu
release: 1.44.0
LLVM version: 9.0

$ rustup install 1.45.0
$ rustc +1.45.0 -Vv
rustc 1.45.0 (5c1f21c3b 2020-07-13)
binary: rustc
commit-hash: 5c1f21c3b82297671ad3ae1e8c942d2ca92e84f2
commit-date: 2020-07-13
host: x86_64-unknown-linux-gnu
release: 1.45.0
LLVM version: 10.0

$ rustup install 1.46.0
$ rustc +stable -Vv
rustc 1.46.0 (04488afe3 2020-08-24)
binary: rustc
commit-hash: 04488afe34512aa4c33566eb16d8c912a3ae04f9
commit-date: 2020-08-24
host: x86_64-unknown-linux-gnu
release: 1.46.0
LLVM version: 10.0
```

3 years agoRollup merge of #76401 - JulianKnodt:i68366, r=lcnr
Dylan DPC [Tue, 8 Sep 2020 23:35:20 +0000 (01:35 +0200)]
Rollup merge of #76401 - JulianKnodt:i68366, r=lcnr

Add help note to unconstrained const parameter

Resolves #68366, since it is currently intended behaviour.
If demonstrating `T -> U` is injective, there should be an additional word that it is not **yet** supported.

r? @lcnr

3 years agoRollup merge of #76396 - dylni:fix-typo-in-tracking-issue-template, r=jonas-schievink
Dylan DPC [Tue, 8 Sep 2020 23:35:18 +0000 (01:35 +0200)]
Rollup merge of #76396 - dylni:fix-typo-in-tracking-issue-template, r=jonas-schievink

Fix typo in tracking issue template

3 years agoRollup merge of #76389 - MaulingMonkey:pr-natvis-hashmap-vsc, r=petrochenkov
Dylan DPC [Tue, 8 Sep 2020 23:35:17 +0000 (01:35 +0200)]
Rollup merge of #76389 - MaulingMonkey:pr-natvis-hashmap-vsc, r=petrochenkov

Fix HashMap visualizers in Visual Studio (Code)

CDB (as used in unit tests) doesn't care that we're using static_cast between unrelated types (`u8*` to `tuple<$T1, $T2>*`).
Visual Studio & Visual Studio Code care.  These should've been reinterpret_cast or C casts.

Credit to @petrochenkov per https://github.com/rust-lang/rust/issues/76352 for helping catch this.

### Testing

```cmd
x.py test --stage 1 src/tools/tidy
x.py test --stage 1 --build x86_64-pc-windows-msvc src\test\debuginfo
```

3 years agoRollup merge of #76379 - petrochenkov:nodegen, r=Mark-Simulacrum
Dylan DPC [Tue, 8 Sep 2020 23:35:15 +0000 (01:35 +0200)]
Rollup merge of #76379 - petrochenkov:nodegen, r=Mark-Simulacrum

rustbuild: Remove `Mode::Codegen`

It's no longer used.

3 years agoRollup merge of #76374 - pickfire:patch-4, r=Cldfire
Dylan DPC [Tue, 8 Sep 2020 23:35:13 +0000 (01:35 +0200)]
Rollup merge of #76374 - pickfire:patch-4, r=Cldfire

Improve ayu doc source line number contrast

Improve contrast of foreground line number.

Before

![image](https://user-images.githubusercontent.com/4687791/92305696-1bf2ab80-efbc-11ea-8b5c-a24c4f6261e0.png)

After

![image](https://user-images.githubusercontent.com/4687791/92305700-2a40c780-efbc-11ea-9061-dbfcb1e71980.png)

r? @Cldfire

I think we should add the line for light and dark theme too, it looks better and clearer that way.

3 years agoRollup merge of #76355 - calebcartwright:reduce-rustfmt-visibility, r=nikomatsakis
Dylan DPC [Tue, 8 Sep 2020 23:35:11 +0000 (01:35 +0200)]
Rollup merge of #76355 - calebcartwright:reduce-rustfmt-visibility, r=nikomatsakis

remove public visibility previously needed for rustfmt

`submod_path_from_attr` in rustc_expand::module was previously public because it was also consumed by rustfmt. However, we've done a bit of refactoring in rustfmt and no longer need to use this function.

This changes the visibility to the parent mod as was originally going to be done before the rustfmt dependency was realized (https://github.com/rust-lang/rust/commit/c189565edc5c9fc516170885b3a3061b936205fb#diff-cd1b379893bae95f7991d5a3f3c6d337R201)

3 years agoRollup merge of #76162 - abrausch:documentation-fix-duration_since, r=jyn514
Dylan DPC [Tue, 8 Sep 2020 23:35:10 +0000 (01:35 +0200)]
Rollup merge of #76162 - abrausch:documentation-fix-duration_since, r=jyn514

Make duration_since documentation more clear

3 years agoUpdate cargo
Eric Huss [Tue, 8 Sep 2020 22:10:21 +0000 (15:10 -0700)]
Update cargo

3 years agoMake duration_since documentation more clear
Alexander Brausch [Mon, 31 Aug 2020 14:20:24 +0000 (16:20 +0200)]
Make duration_since documentation more clear

3 years agoUpdate tests
Guillaume Gomez [Sat, 5 Sep 2020 12:55:15 +0000 (14:55 +0200)]
Update tests

3 years agoCreate new E0774 code error
Guillaume Gomez [Sat, 5 Sep 2020 12:55:08 +0000 (14:55 +0200)]
Create new E0774 code error

3 years agoAuto merge of #76332 - Mark-Simulacrum:bootstrap-llvm, r=pietroalbini
bors [Tue, 8 Sep 2020 16:01:26 +0000 (16:01 +0000)]
Auto merge of #76332 - Mark-Simulacrum:bootstrap-llvm, r=pietroalbini

Add rust-dev component to support rustc development

This is preparatory work for permitting rustc developers to use CI-built LLVM rather than building it locally. Unlike distro-built LLVM, CI built LLVM is essentially guaranteed to behave perfectly for local development -- it is fully up to date, and carries all necessary patches.

This is a separate PR from #76349 because it needs to land before that one, since we want a master build with the full CI LLVM to be available for easier testing.

3 years agoAuto merge of #76469 - RalfJung:miri, r=RalfJung
bors [Tue, 8 Sep 2020 11:56:09 +0000 (11:56 +0000)]
Auto merge of #76469 - RalfJung:miri, r=RalfJung

update Miri

Fixes https://github.com/rust-lang/rust/issues/76337
r? `@ghost` Cc `@rust-lang/miri`

3 years agoAuto merge of #76308 - wesleywiser:enable_simplifyarmidentity_mir_opt, r=oli-obk
bors [Tue, 8 Sep 2020 09:27:23 +0000 (09:27 +0000)]
Auto merge of #76308 - wesleywiser:enable_simplifyarmidentity_mir_opt, r=oli-obk

Enable the SimplifyArmIdentity MIR optimization at mir-opt-level=1

r? `@ghost`

3 years agoupdate Miri
Ralf Jung [Tue, 8 Sep 2020 08:50:52 +0000 (10:50 +0200)]
update Miri

3 years agoAuto merge of #76423 - Mark-Simulacrum:stable-bootstrap, r=jyn514
bors [Tue, 8 Sep 2020 07:08:50 +0000 (07:08 +0000)]
Auto merge of #76423 - Mark-Simulacrum:stable-bootstrap, r=jyn514

Make bootstrap build on beta

This is generally a good idea, and will help with being able to build bootstrap
without Python over time as it means we can "just" build with cargo +beta build
rather than needing the user to set environment variables. This is a minor step,
but a necessary one on that road.

r? `@jyn514`

3 years agoAuto merge of #75585 - RalfJung:demotion, r=oli-obk
bors [Tue, 8 Sep 2020 05:13:42 +0000 (05:13 +0000)]
Auto merge of #75585 - RalfJung:demotion, r=oli-obk

Do not promote &mut of a non-ZST ever

Since ~pre-1.0~ 1.36, we have accepted code like this:
```rust
static mut TEST: &'static mut [i32] = {
    let x = &mut [1,2,3];
    x
};
```
I tracked it back to https://github.com/rust-lang/rust/pull/21744, but unfortunately could not find any discussion or RFC that would explain why we thought this was a good idea. And it's not, it breaks all sorts of things -- see https://github.com/rust-lang/rust/issues/75556.

To fix https://github.com/rust-lang/rust/issues/75556, we have to stop promoting non-ZST mutable references no matter the context, which is what this PR does. It's a breaking change.

Notice that this still works, since it does not rely on promotion:
```rust
static mut TEST: &'static mut [i32] = &mut [0,1,2];
```

Cc `@rust-lang/wg-const-eval`

3 years agoAuto merge of #76210 - Mark-Simulacrum:tracing-update, r=oli-obk
bors [Tue, 8 Sep 2020 03:22:31 +0000 (03:22 +0000)]
Auto merge of #76210 - Mark-Simulacrum:tracing-update, r=oli-obk

Tracing update

This does not bring the more significant changes that are coming down the pipeline, but since I've already prepared the PR leaving it up :)

See https://github.com/rust-lang/rust/pull/76210#issuecomment-685065938:
> Unfortunately, tracing 0.1.20 — which contained the change to reduce the amount of code generated by the tracing macros — had to be yanked, as it broke previously-compiling code for some downstream crates. I've not yet had the chance to fix this and release a new patch. So, in order to benefit from the changes to reduce generated code, you'll need to wait until there's a new version of tracing as well as tracing-attributes and tracing-core.

3 years agoAdd "For example,"
Camelid [Tue, 8 Sep 2020 01:48:22 +0000 (18:48 -0700)]
Add "For example,"

3 years agoImprove wording of E0607 explanation
Camelid [Tue, 8 Sep 2020 01:25:14 +0000 (18:25 -0700)]
Improve wording of E0607 explanation

3 years agoAuto merge of #75138 - jumbatm:session-diagnostic-derive, r=oli-obk
bors [Tue, 8 Sep 2020 00:58:43 +0000 (00:58 +0000)]
Auto merge of #75138 - jumbatm:session-diagnostic-derive, r=oli-obk

Add derive macro for specifying diagnostics using attributes.

Introduces `#[derive(SessionDiagnostic)]`, a derive macro for specifying structs that can be converted to Diagnostics using directions given by attributes on the struct and its fields. Currently, the following attributes have been implemented:
- `#[code = "..."]` -- this sets the Diagnostic's error code, and must be provided on the struct iself (ie, not on a field). Equivalent to calling `code`.
- `#[message = "..."]` -- this sets the Diagnostic's primary error message.
- `#[label = "..."]` -- this must be applied to fields of type `Span`, and is equivalent to `span_label`
- `#[suggestion(..)]` -- this allows a suggestion message to be supplied. This attribute must be applied to a field of type `Span` or `(Span, Applicability)`, and is equivalent to calling `span_suggestion`. Valid arguments are:
    - `message = "..."` -- this sets the suggestion message.
    - (Optional) `code = "..."` -- this suggests code for the suggestion. Defaults to empty.

`suggestion`also  comes with other variants: `#[suggestion_short(..)]`, `#[suggestion_hidden(..)]` and `#[suggestion_verbose(..)]` which all take the same keys.

Within the strings passed to each attribute, fields can be referenced without needing to be passed explicitly into the format string -- eg, `#[error = "{ident} already declared"] ` will set the error message to `format!("{} already declared", &self.ident)`. Any fields on the struct can be referenced in this way.

Additionally, for any of these attributes, Option fields can be used to only optionally apply the decoration -- for example:

```rust
#[derive(SessionDiagnostic)]
#[code = "E0123"]
struct SomeKindOfError {
    ...
    #[suggestion(message = "informative error message")]
    opt_sugg: Option<(Span, Applicability)>
    ...
}
```
will not emit a suggestion if `opt_sugg` is `None`.

We plan on iterating on this macro further; this PR is a start.

Closes #61132.

r? `@oli-obk`

3 years agoMake rustdoc output deterministic for UI tests
Joshua Nelson [Tue, 8 Sep 2020 00:32:09 +0000 (20:32 -0400)]
Make rustdoc output deterministic for UI tests

3 years agoAuto merge of #76044 - ecstatic-morse:dataflow-lattice, r=oli-obk
bors [Mon, 7 Sep 2020 21:29:43 +0000 (21:29 +0000)]
Auto merge of #76044 - ecstatic-morse:dataflow-lattice, r=oli-obk

Support dataflow problems on arbitrary lattices

This PR implements last of the proposed extensions I mentioned in the design meeting for the original dataflow refactor. It extends the current dataflow framework to work with arbitrary lattices, not just `BitSet`s. This is a prerequisite for dataflow-enabled MIR const-propagation. Personally, I am skeptical of the usefulness of doing const-propagation pre-monomorphization, since many useful constants only become known after monomorphization (e.g. `size_of::<T>()`) and users have a natural tendency to hand-optimize the rest. It's probably worth exprimenting with, however, and others have shown interest cc `@rust-lang/wg-mir-opt.`

The `Idx` associated type is moved from `AnalysisDomain` to `GenKillAnalysis` and replaced with an associated `Domain` type that must implement `JoinSemiLattice`. Like before, each `Analysis` defines the "bottom value" for its domain, but can no longer override the dataflow join operator. Analyses that want to use set intersection must now use the `lattice::Dual` newtype. `GenKillAnalysis` impls have an additional requirement that `Self::Domain: BorrowMut<BitSet<Self::Idx>>`, which effectively means that they must use `BitSet<Self::Idx>` or `lattice::Dual<BitSet<Self::Idx>>` as their domain.

Most of these changes were mechanical. However, because a `Domain` is no longer always a powerset of some index type, we can no longer use an `IndexVec<BasicBlock, GenKillSet<A::Idx>>>` to store cached block transfer functions. Instead, we use a boxed `dyn Fn` trait object. I discuss a few alternatives to the current approach in a commit message.

The majority of new lines of code are to preserve existing Graphviz diagrams for those unlucky enough to have to debug dataflow analyses. I find these diagrams incredibly useful when things are going wrong and considered regressing them unacceptable, especially the pretty-printing of `MovePathIndex`s, which are used in many dataflow analyses. This required a parallel `fmt` trait used only for printing dataflow domains, as well as a refactoring of the `graphviz` module now that we cannot expect the domain to be a `BitSet`. Some features did have to be removed, such as the gen/kill display mode (which I didn't use but existed to mirror the output of the old dataflow framework) and line wrapping. Since I had to rewrite much of it anyway, I took the opportunity to switch to a `Visitor` for printing dataflow state diffs instead of using cursors, which are error prone for code that must be generic over both forward and backward analyses. As a side-effect of this change, we no longer have quadratic behavior when writing graphviz diagrams for backward dataflow analyses.

r? `@pnkfelix`

3 years agorustdoc: Fix font CSS for crate lists
Camelid [Mon, 7 Sep 2020 20:54:31 +0000 (13:54 -0700)]
rustdoc: Fix font CSS for crate lists

I had put it in the wrong file in #76126. This should fix it now. Thank
you to @ollie27 for pointing this out!

3 years agoAdd regression test and help note
kadmin [Sun, 6 Sep 2020 04:34:20 +0000 (04:34 +0000)]
Add regression test and help note

3 years agoDedicated rust development tarball
Mark Rousskov [Fri, 4 Sep 2020 17:59:14 +0000 (13:59 -0400)]
Dedicated rust development tarball

This currently includes libLLVM, llvm-config, and FileCheck, but will perhaps
expand to more tooling overtime. It should be considered entirely unstable and
may change at any time.

3 years agoAuto merge of #74366 - t-rapp:tr-bufreader-pos, r=LukasKalbertodt
bors [Mon, 7 Sep 2020 11:09:41 +0000 (11:09 +0000)]
Auto merge of #74366 - t-rapp:tr-bufreader-pos, r=LukasKalbertodt

Implement Seek::stream_position() for BufReader

Optimization over `BufReader::seek()` for getting the current position without flushing the internal buffer.

Related to #31100. Based on the code in #70577.

3 years agoAuto merge of #76395 - dylni:adjust-documentation-for-slice-check-range, r=jyn514
bors [Mon, 7 Sep 2020 09:16:46 +0000 (09:16 +0000)]
Auto merge of #76395 - dylni:adjust-documentation-for-slice-check-range, r=jyn514

Adjust documentation for slice_check_range

Adjust documentation for #76393.

3 years agoImplement Seek::stream_position() for BufReader
Tobias Rapp [Tue, 1 Sep 2020 07:22:35 +0000 (09:22 +0200)]
Implement Seek::stream_position() for BufReader

Optimization over BufReader::seek() for getting the current position
without flushing the internal buffer.

Related to #31100. Based on code in #70577.

3 years agoAuto merge of #76368 - ayushmishra2005:move_str_contact_library, r=jyn514
bors [Mon, 7 Sep 2020 05:20:46 +0000 (05:20 +0000)]
Auto merge of #76368 - ayushmishra2005:move_str_contact_library, r=jyn514

Added str tests in library

Added str tests in library  as a part of #76268

r? @matklad

3 years agoAuto merge of #76409 - jonas-schievink:fix-r-a-on-libcore, r=Mark-Simulacrum
bors [Mon, 7 Sep 2020 02:20:44 +0000 (02:20 +0000)]
Auto merge of #76409 - jonas-schievink:fix-r-a-on-libcore, r=Mark-Simulacrum

Remove unneeded `#[cfg(not(test))]` from libcore

This fixes rust-analyzer inside these modules (currently it does not analyze them, assuming they're configured out).

3 years agoMake bootstrap build on stable
Mark Rousskov [Sun, 6 Sep 2020 23:38:26 +0000 (19:38 -0400)]
Make bootstrap build on stable

This is generally a good idea, and will help with being able to build bootstrap
without Python over time as it means we can "just" build with cargo +beta build
rather than needing the user to set environment variables. This is a minor step,
but a necessary one on that road.

3 years agoAuto merge of #76422 - Dylan-DPC:rollup-0579ucb, r=Dylan-DPC
bors [Mon, 7 Sep 2020 00:33:47 +0000 (00:33 +0000)]
Auto merge of #76422 - Dylan-DPC:rollup-0579ucb, r=Dylan-DPC

Rollup of 18 pull requests

Successful merges:

 - #76273 (Move some Vec UI tests into alloc unit tests)
 - #76274 (Allow try blocks as the argument to return expressions)
 - #76287 (Remove an unnecessary allowed lint)
 - #76293 (Implementation of incompatible features error)
 - #76299 (Make `Ipv4Addr` and `Ipv6Addr` const tests unit tests under `library`)
 - #76302 (Address review comments on `Peekable::next_if`)
 - #76303 (Link to `#capacity-and-reallocation` when using with_capacity)
 - #76305 (Move various ui const tests to `library`)
 - #76309 (Indent a note to make folding work nicer)
 - #76312 (time.rs: Make spelling of "Darwin" consistent)
 - #76318 (Use ops::ControlFlow in rustc_data_structures::graph::iterate)
 - #76324 (Move Vec slice UI tests in library)
 - #76338 (add some intra-doc links to `Iterator`)
 - #76340 (Remove unused duplicated `trivial_dropck_outlives`)
 - #76344 (Improve docs for `std::env::args()`)
 - #76346 (Docs: nlink example typo)
 - #76358 (Minor grammar fix in doc comment for soft-deprecated methods)
 - #76364 (Disable atomics on avr target.)

Failed merges:

 - #76304 (Make delegation methods of `std::net::IpAddr` unstably const)

r? @ghost

3 years agoRollup merge of #76364 - fusion-engineering-forks:avr-no-atomic, r=jonas-schievink
Dylan DPC [Sun, 6 Sep 2020 23:18:17 +0000 (01:18 +0200)]
Rollup merge of #76364 - fusion-engineering-forks:avr-no-atomic, r=jonas-schievink

Disable atomics on avr target.

`max_atomic_width` was missing in the spec, which means it fell back to the pointer width of 16 bits.

Fixes #76363.

3 years agoRollup merge of #76358 - Wilfred:patch-3, r=lcnr
Dylan DPC [Sun, 6 Sep 2020 23:18:15 +0000 (01:18 +0200)]
Rollup merge of #76358 - Wilfred:patch-3, r=lcnr

Minor grammar fix in doc comment for soft-deprecated methods

3 years agoRollup merge of #76346 - gillespiecd:nlinks-docs, r=Dylan-DPC
Dylan DPC [Sun, 6 Sep 2020 23:18:13 +0000 (01:18 +0200)]
Rollup merge of #76346 - gillespiecd:nlinks-docs, r=Dylan-DPC

Docs: nlink example typo

Small typo fix for the `nlink` function, extra whitespace before the `use` declaration

3 years agoRollup merge of #76344 - camelid:patch-6, r=KodrAus
Dylan DPC [Sun, 6 Sep 2020 23:18:12 +0000 (01:18 +0200)]
Rollup merge of #76344 - camelid:patch-6, r=KodrAus

Improve docs for `std::env::args()`

@rustbot modify labels: T-doc

3 years agoRollup merge of #76340 - jonas-schievink:rm-dupe, r=Mark-Simulacrum
Dylan DPC [Sun, 6 Sep 2020 23:18:10 +0000 (01:18 +0200)]
Rollup merge of #76340 - jonas-schievink:rm-dupe, r=Mark-Simulacrum

Remove unused duplicated `trivial_dropck_outlives`

The copy that is actually in use now lives here:

https://github.com/rust-lang/rust/blob/d2454643e137bde519786ee9e650c455d7ad6f34/compiler/rustc_trait_selection/src/traits/query/dropck_outlives.rs#L84

3 years agoRollup merge of #76338 - euclio:intra-link-iterator, r=jyn514
Dylan DPC [Sun, 6 Sep 2020 23:18:08 +0000 (01:18 +0200)]
Rollup merge of #76338 - euclio:intra-link-iterator, r=jyn514

add some intra-doc links to `Iterator`

3 years agoRollup merge of #76324 - ayushmishra2005:move_vec_tests_in_library, r=matklad
Dylan DPC [Sun, 6 Sep 2020 23:18:07 +0000 (01:18 +0200)]
Rollup merge of #76324 - ayushmishra2005:move_vec_tests_in_library, r=matklad

Move Vec slice UI tests in library

Moved some of Vec slice UI tests in Library as a part of #76268

r? @matklad

3 years agoRollup merge of #76318 - scottmcm:one-control-flow, r=ecstatic-morse
Dylan DPC [Sun, 6 Sep 2020 23:18:05 +0000 (01:18 +0200)]
Rollup merge of #76318 - scottmcm:one-control-flow, r=ecstatic-morse

Use ops::ControlFlow in rustc_data_structures::graph::iterate

Since I only know about this because you mentioned it,
r? @ecstatic-morse

If we're not supposed to use new `core` things in compiler for a while then feel free to close, but it felt reasonable to merge the two types since they're the same, and it might be convenient for people to use `?` in their traversal code.

(This doesn't do the type parameter swap; NoraCodes has signed up to do that one.)

3 years agoRollup merge of #76312 - numbermaniac:patch-1, r=shepmaster
Dylan DPC [Sun, 6 Sep 2020 23:18:03 +0000 (01:18 +0200)]
Rollup merge of #76312 - numbermaniac:patch-1, r=shepmaster

time.rs: Make spelling of "Darwin" consistent

On line 89 of this file, the OS name is written as "Darwin", but on line 162 it is written in all-caps. Darwin is usually spelt as a standard proper noun, i.e. "Darwin", rather than in all-caps.

This change makes that form consistent in both places.

3 years agoRollup merge of #76309 - lzutao:indent-note, r=jyn514
Dylan DPC [Sun, 6 Sep 2020 23:18:01 +0000 (01:18 +0200)]
Rollup merge of #76309 - lzutao:indent-note, r=jyn514

Indent a note to make folding work nicer

Sublime Text folds code based on indentation. It maybe an unnecessary change, but does it look nicer after that ?

3 years agoRollup merge of #76305 - CDirkx:const-tests, r=matklad
Dylan DPC [Sun, 6 Sep 2020 23:17:59 +0000 (01:17 +0200)]
Rollup merge of #76305 - CDirkx:const-tests, r=matklad

Move various ui const tests to `library`

Move:
 - `src\test\ui\consts\const-nonzero.rs` to `library\core`
 - `src\test\ui\consts\ascii.rs` to `library\core`
 - `src\test\ui\consts\cow-is-borrowed` to `library\alloc`

Part of #76268

r? @matklad

3 years agoRollup merge of #76303 - jyn514:vec-assert-doc, r=Dylan-DPC
Dylan DPC [Sun, 6 Sep 2020 23:17:56 +0000 (01:17 +0200)]
Rollup merge of #76303 - jyn514:vec-assert-doc, r=Dylan-DPC

Link to `#capacity-and-reallocation` when using with_capacity

Follow up to https://github.com/rust-lang/rust/pull/76058#discussion_r479655750.
r? @pickfire

3 years agoRollup merge of #76302 - jyn514:peekable-2, r=Dylan-DPC
Dylan DPC [Sun, 6 Sep 2020 23:17:54 +0000 (01:17 +0200)]
Rollup merge of #76302 - jyn514:peekable-2, r=Dylan-DPC

Address review comments on `Peekable::next_if`

r? @pickfire
See https://github.com/rust-lang/rust/pull/72310#pullrequestreview-480895893 for context.

3 years agoRollup merge of #76299 - CDirkx:ip-tests, r=matklad
Dylan DPC [Sun, 6 Sep 2020 23:17:52 +0000 (01:17 +0200)]
Rollup merge of #76299 - CDirkx:ip-tests, r=matklad

Make `Ipv4Addr` and `Ipv6Addr` const tests unit tests under `library`

These tests are about the standard library, not the compiler itself, thus should live in `library`, see #76268.

3 years agoRollup merge of #76293 - Amjad50:incompatible_features_error, r=lcnr
Dylan DPC [Sun, 6 Sep 2020 23:17:50 +0000 (01:17 +0200)]
Rollup merge of #76293 - Amjad50:incompatible_features_error, r=lcnr

Implementation of incompatible features error

Proposal of a new error: Incompatible features

This error should happen if two features which are not compatible are used together.

For now the only incompatible features are `const_generics` and `min_const_generics`

fixes #76280

3 years agoRollup merge of #76287 - lzutao:rm-allowed, r=jyn514
Dylan DPC [Sun, 6 Sep 2020 23:17:48 +0000 (01:17 +0200)]
Rollup merge of #76287 - lzutao:rm-allowed, r=jyn514

Remove an unnecessary allowed lint

It is outdated.

3 years agoRollup merge of #76274 - scottmcm:fix-76271, r=petrochenkov
Dylan DPC [Sun, 6 Sep 2020 23:17:46 +0000 (01:17 +0200)]
Rollup merge of #76274 - scottmcm:fix-76271, r=petrochenkov

Allow try blocks as the argument to return expressions

Fixes #76271

I don't think this needs to be edition-aware (phew) since `return try` in 2015 is also the start of an expression, just with a struct literal instead of a block (`return try { x: 4, y: 5 }`).

3 years agoRollup merge of #76273 - CraftSpider:master, r=matklad
Dylan DPC [Sun, 6 Sep 2020 23:17:45 +0000 (01:17 +0200)]
Rollup merge of #76273 - CraftSpider:master, r=matklad

Move some Vec UI tests into alloc unit tests

A bit of work towards #76268, makes a number of the Vec UI tests that are simply running code into unit tests. Ensured that they are being run when testing liballoc locally.

3 years agoAuto merge of #76229 - camelid:patch-3, r=jonas-schievink
bors [Sun, 6 Sep 2020 22:42:21 +0000 (22:42 +0000)]
Auto merge of #76229 - camelid:patch-3, r=jonas-schievink

Add missing link in README

3 years agoAuto merge of #76157 - ArekPiekarz:const_caller_location_tracking_issue, r=joshtriplett
bors [Sun, 6 Sep 2020 20:27:51 +0000 (20:27 +0000)]
Auto merge of #76157 - ArekPiekarz:const_caller_location_tracking_issue, r=joshtriplett

Update tracking issue for const_caller_location

Update the tracking issue to https://github.com/rust-lang/rust/issues/76156, as suggested in https://github.com/rust-lang/rust/issues/76105.

3 years agoRemove duplicate 'note:'
Joshua Nelson [Sun, 6 Sep 2020 19:18:45 +0000 (15:18 -0400)]
Remove duplicate 'note:'

3 years agoMove sections about contributing closer together
Joshua Nelson [Sun, 6 Sep 2020 19:14:29 +0000 (15:14 -0400)]
Move sections about contributing closer together

3 years agoAuto merge of #75949 - vext01:filter-docs, r=jyn514
bors [Sun, 6 Sep 2020 18:26:33 +0000 (18:26 +0000)]
Auto merge of #75949 - vext01:filter-docs, r=jyn514

Try to improve the documentation of `filter()` and `filter_map()`.

I believe the documentation is currently a little misleading.

For example, in the docs for `filter()`:

> If the closure returns `false`, it will try again, and call the closure on
> the next element, seeing if it passes the test.

This kind of implies that if the closure returns true then we *don't* "try
again" and no further elements are considered. In actuality that's not the
case, every element is tried regardless of what happened with the previous
element.

This change tries to clarify that by removing the uses of "try again"
altogether.

3 years agoAuto merge of #76390 - MaulingMonkey:pr-min-cdb-version, r=petrochenkov
bors [Sun, 6 Sep 2020 16:26:33 +0000 (16:26 +0000)]
Auto merge of #76390 - MaulingMonkey:pr-min-cdb-version, r=petrochenkov

debuginfo:  Ignore HashMap .natvis tests before cdb 10.0.18362.1

CDB <10.0.18362.1 chokes on casts within HashMap's natvis visualizers.  This PR adds support for "min-cdb-version" (per existing "min-gdb-version" and "min-lldb-version" filters) and uses it.  CI uses a more recent version of CDB for testing and thus should still run the tests.

Credit to @petrochenkov per https://github.com/rust-lang/rust/issues/76352 for helping catch this.

### SDK Testing

| Win 10 SDK                                                             |  x64 CDB          | rustc 1.47.0-nightly (bf4342114 2020-08-25) built-in .natvis  | Note |
| --------------------------------------------------------------------- | ----------------- | ------------------------------------------------------------- | ---- |
| [10.0.19041.0](https://go.microsoft.com/fwlink/p/?linkid=2120843)     | 10.0.19041.1      | ✔️                                                            | CI
| [10.0.18362.1](https://go.microsoft.com/fwlink/?linkid=2083338)       | 10.0.18362.1      | ✔️                                                            | MaulingMonkey
| [10.0.17763.0](https://go.microsoft.com/fwlink/p/?LinkID=2033908)     | 10.0.17763.132    | ❌ `Unable to find type 'tuple<u64,u64> *' for cast.`
| [10.0.17134.12](https://go.microsoft.com/fwlink/p/?linkid=870807)     | 10.0.17134.12     | ❌ `Unable to find type 'tuple<u64,u64> *' for cast.`
| [10.0.16299.91](https://go.microsoft.com/fwlink/p/?linkid=864422)     | 10.0.16299.91     | ❌ `Unable to find type 'tuple<u64,u64> *' for cast.`
| [10.0.15063.468](https://go.microsoft.com/fwlink/p/?LinkId=845298)    | 10.0.15063.468    | ❌ `Unable to find type 'tuple<u64,u64> *' for cast.`
| [10.0.14393.795](https://go.microsoft.com/fwlink/p/?LinkId=838916)    | 10.0.14321.1024   | ❌ `Unable to find type 'tuple<u64,u64> *' for cast.` | petrochenkov
| [10.0.10586.212](https://go.microsoft.com/fwlink/p/?LinkID=698771)    | 10.0.10586.567    | ❌ `Expected ')' at '+ 1)].__1'`
| [10.0.10240](https://go.microsoft.com/fwlink/p/?LinkId=619296)        | 10.0.10240?       | ❔ Untested

### Rust Testing

```cmd
x.py test --stage 1 src/tools/tidy
x.py test --stage 1 --build x86_64-pc-windows-msvc src\test\debuginfo
```

Also verified test still fails when intentionally broken w/ CDB version >= min-cdb-version.

3 years agoAuto merge of #76067 - simonvandel:peephole-ne, r=wesleywiser
bors [Sun, 6 Sep 2020 14:21:11 +0000 (14:21 +0000)]
Auto merge of #76067 - simonvandel:peephole-ne, r=wesleywiser

MIR peephole optimize {Ne, Eq}(_1, false) into _1

Add peephole optimization that simplifies Ne(_1, false) and Ne(false, _1) into _1. Similarly handles Eq(_1, true) and Eq(true, _1).

This was observed emitted from the MatchBranchSimplification pass.

3 years agoRemove unneeded `#[cfg(not(test))]` from libcore
Jonas Schievink [Sun, 6 Sep 2020 14:00:28 +0000 (16:00 +0200)]
Remove unneeded `#[cfg(not(test))]` from libcore

3 years agoAuto merge of #76128 - poliorcetics:doc-use-arc-clone, r=KodrAus
bors [Sun, 6 Sep 2020 12:34:31 +0000 (12:34 +0000)]
Auto merge of #76128 - poliorcetics:doc-use-arc-clone, r=KodrAus

Use Arc::clone and Rc::clone in documentation

This PR replaces uses of `x.clone()` by `Rc::clone(&x)` (or `Arc::clone(&x)`) to better match the documentation for those types.

@rustbot modify labels: T-doc

3 years agoadd compile-fail test for &mut promotion
Ralf Jung [Sun, 16 Aug 2020 15:51:49 +0000 (17:51 +0200)]
add compile-fail test for &mut promotion

3 years agodo not premote non-ZST mutable references ever
Ralf Jung [Sun, 16 Aug 2020 09:08:29 +0000 (11:08 +0200)]
do not premote non-ZST mutable references ever

3 years agolinker-plugin-lto.md: Convert the rust-clang MxN table to a 2xM table
Elichai Turkel [Sun, 6 Sep 2020 11:55:27 +0000 (14:55 +0300)]
linker-plugin-lto.md: Convert the rust-clang MxN table to a 2xM table

3 years agoAuto merge of #76370 - fusion-engineering-forks:synconcecell-soundness, r=nagisa
bors [Sun, 6 Sep 2020 10:29:54 +0000 (10:29 +0000)]
Auto merge of #76370 - fusion-engineering-forks:synconcecell-soundness, r=nagisa

Fix dropck issue of SyncOnceCell.

Fixes #76367.

3 years agoFix documentation for TyCtxt::all_impls
Sasha [Sun, 6 Sep 2020 10:10:46 +0000 (12:10 +0200)]
Fix documentation for TyCtxt::all_impls

3 years agoGeneralize to Eq(true, _place) and Eq(_place, true)
Simon Vandel Sillesen [Thu, 3 Sep 2020 17:48:27 +0000 (19:48 +0200)]
Generalize to Eq(true, _place) and Eq(_place, true)

3 years agoAdd peephold optimization that simplifies Ne(_1, false) and Ne(false, _1) into _1
Simon Vandel Sillesen [Sat, 29 Aug 2020 12:16:39 +0000 (14:16 +0200)]
Add peephold optimization that simplifies Ne(_1, false) and Ne(false, _1) into _1

This was observed emitted from the MatchBranchSimplification pass.

3 years agoUpdate linker-plugin-lto.md to contain up to rust 1.46
Elichai Turkel [Sun, 6 Sep 2020 08:20:53 +0000 (11:20 +0300)]
Update linker-plugin-lto.md to contain up to rust 1.46

3 years agoAuto merge of #76341 - richkadel:ignore-gcc-destructor-priority, r=cuviper
bors [Sun, 6 Sep 2020 08:13:39 +0000 (08:13 +0000)]
Auto merge of #76341 - richkadel:ignore-gcc-destructor-priority, r=cuviper

Update llvm-project to include PR 73

https://github.com/rust-lang/llvm-project/pull/73

r? @cuviper

3 years agoAuto merge of #76331 - Aaron1011:fix/group-compat-hack-test, r=petrochenkov
bors [Sun, 6 Sep 2020 06:15:28 +0000 (06:15 +0000)]
Auto merge of #76331 - Aaron1011:fix/group-compat-hack-test, r=petrochenkov

Account for version number in NtIdent hack

Issue #74616 tracks a backwards-compatibility hack for certain macros.
This has is implemented by hard-coding the filenames and macro names of
certain code that we want to continue to compile.

However, the initial implementation of the hack was based on the
directory structure when building the crate from its repository (e.g.
`js-sys/src/lib.rs`). When the crate is build as a dependency, it will
include a version number from the clone from the cargo registry (e.g.
`js-sys-0.3.17/src/lib.rs`), which would fail the check.

This commit modifies the backwards-compatibility hack to check that
desired crate name (`js-sys` or `time-macros-impl`) is a prefix of the
proper part of the path.

See https://github.com/rust-lang/rust/issues/76070#issuecomment-687215646
for more details.

3 years agoAuto merge of #76326 - mati865:use_lld-no-linker, r=Mark-Simulacrum
bors [Sun, 6 Sep 2020 04:00:56 +0000 (04:00 +0000)]
Auto merge of #76326 - mati865:use_lld-no-linker, r=Mark-Simulacrum

Fix rust.use-lld when linker is not set

Fixes https://github.com/rust-lang/rust/pull/76127#issuecomment-685419195

Previously when `[<target>].linker` was not configured `rust.use-lld` would set it to `rust-lld` on platforms where it should not.

3 years agoMove test-cases in string.rs
Ayush Kumar Mishra [Sun, 6 Sep 2020 03:53:40 +0000 (09:23 +0530)]
Move test-cases in string.rs

3 years agoAuto merge of #76307 - sunfishcode:wasm-no-eh-frame-header, r=alexcrichton
bors [Sun, 6 Sep 2020 01:58:35 +0000 (01:58 +0000)]
Auto merge of #76307 - sunfishcode:wasm-no-eh-frame-header, r=alexcrichton

Disable use of `--eh-frame-hdr` on wasm32.

Set wasm32's `TargetOptions::eh_frame_header` to false so that we don't pass `--eh-frame-hdr` to `wasm-ld`, which doesn't support that flag.

r? @alexcrichton

3 years agoFix typo in tracking issue template
dylni [Sun, 6 Sep 2020 00:12:26 +0000 (20:12 -0400)]
Fix typo in tracking issue template

3 years agoAdjust documentation for slice_check_range
dylni [Sat, 5 Sep 2020 23:53:35 +0000 (19:53 -0400)]
Adjust documentation for slice_check_range

3 years agoAuto merge of #76385 - calebcartwright:update-rls-rustfmt, r=Xanewok
bors [Sat, 5 Sep 2020 23:29:05 +0000 (23:29 +0000)]
Auto merge of #76385 - calebcartwright:update-rls-rustfmt, r=Xanewok

Update RLS and Rustfmt

Fixes #76145 and fixes #76146

cc @Xanewok @topecongiro

3 years agoFix HashMap visualizers in Visual Studio (Code)
MaulingMonkey [Sat, 5 Sep 2020 21:50:03 +0000 (14:50 -0700)]
Fix HashMap visualizers in Visual Studio (Code)

CDB doesn't care that you're using static_cast between unrelated types.
VS(C) does.  These should've been reinterpret_cast or C casts.
Cast is from e.g. `u8*` to `tuple<$T1, $T2>*`

3 years agodebuginfo: Ignore HashMap tests before cdb 10.0.18362.1
MaulingMonkey [Sat, 5 Sep 2020 21:47:16 +0000 (14:47 -0700)]
debuginfo: Ignore HashMap tests before cdb 10.0.18362.1

cdb chokes on the cast and reports "Unable to find type 'tuple<u64,u64> *' for cast."

3 years agocompiletest: Introduce "min-cdb-version"
MaulingMonkey [Sat, 5 Sep 2020 21:46:22 +0000 (14:46 -0700)]
compiletest: Introduce "min-cdb-version"

3 years agoAuto merge of #76217 - RalfJung:maybe-uninit-slice, r=KodrAus
bors [Sat, 5 Sep 2020 21:02:18 +0000 (21:02 +0000)]
Auto merge of #76217 - RalfJung:maybe-uninit-slice, r=KodrAus

rename MaybeUninit slice methods

The `first` methods conceptually point to the whole slice, not just its first element, so rename them to be consistent with the raw ptr methods on ref-slices.

Also, do the equivalent of https://github.com/rust-lang/rust/pull/76047 for the slice reference getters, and make them part of https://github.com/rust-lang/rust/issues/63569 (so far they somehow had no tracking issue).

* first_ptr -> slice_as_ptr
* first_ptr_mut -> slice_as_mut_ptr
* slice_get_ref -> slice_assume_init_ref
* slice_get_mut -> slice_assume_init_mut

3 years agoUpdate RLS and Rustfmt
Caleb Cartwright [Sat, 5 Sep 2020 19:03:27 +0000 (14:03 -0500)]
Update RLS and Rustfmt

3 years agoUpdate llvm-project to include PR 73
Rich Kadel [Fri, 4 Sep 2020 20:42:10 +0000 (13:42 -0700)]
Update llvm-project to include PR 73

https://github.com/rust-lang/llvm-project/pull/73

3 years agoAuto merge of #75428 - the8472:fix-copy-eopnotsupp, r=joshtriplett
bors [Sat, 5 Sep 2020 19:09:22 +0000 (19:09 +0000)]
Auto merge of #75428 - the8472:fix-copy-eopnotsupp, r=joshtriplett

Workarounds for copy_file_range issues

fixes #75387
fixes #75446

3 years agoImprove the documentation of `filter()` and `filter_map()`.
Edd Barrett [Wed, 26 Aug 2020 16:39:43 +0000 (17:39 +0100)]
Improve the documentation of `filter()` and `filter_map()`.

I believe the documentation is currently a little misleading.

For example, in the docs for `filter()`:

> If the closure returns `false`, it will try again, and call the closure on
> the next element, seeing if it passes the test.

This kind of implies that if the closure returns true then we *don't* "try
again" and no further elements are considered. In actuality that's not the
case, every element is tried regardless of what happened with the previous
element.

This change tries to clarify that by removing the uses of "try again"
altogether.

3 years agorustbuild: Remove `Mode::Codegen`
Vadim Petrochenkov [Sat, 5 Sep 2020 17:33:00 +0000 (20:33 +0300)]
rustbuild: Remove `Mode::Codegen`

3 years agoAuto merge of #75872 - mati865:pgo-tests, r=petrochenkov
bors [Sat, 5 Sep 2020 17:18:26 +0000 (17:18 +0000)]
Auto merge of #75872 - mati865:pgo-tests, r=petrochenkov

Enable some of profiler tests on Windows-gnu

CC https://github.com/rust-lang/rust/issues/61266

Because of force-push GitHub didn't let me reopen https://github.com/rust-lang/rust/pull/75184

Because of the GCC miscompilation, generated binaries either segfault or `.profraw` is malformed. Clang works fine but we can't use it on the CI.
However we can still test the IR for the proper instrumentation so let's do it.