Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 11 pull requests #72727

Merged
merged 24 commits into from
May 29, 2020
Merged

Rollup of 11 pull requests #72727

merged 24 commits into from
May 29, 2020

Conversation

JohnTitor
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

a1phyr and others added 24 commits April 28, 2020 11:22
Co-authored-by: Ralf Jung <post@ralfj.de>
… rest pattern

add issue 72373 tests


fmt test


fix suggestion format

Replacement, not insertion of suggested string

implement review changes

refactor to span_suggestion_verbose, improve suggestion message,  change id @ pattern space formatting

fmt


fix diagnostics spacing between ident and @


refactor reference
This should hopefully work around rust-lang#65023, which currently makes almost every bootstrap fail for me.
Impl Error for Infallible

This PR only changes the place where `impl Error for Infallible` is documented, as one could think that it is not the case when reading https://doc.rust-lang.org/nightly/std/convert/enum.Infallible.html.

Fixes rust-lang#70842
Tweak and stabilize AtomicN::fetch_update

The fetch_update method implements a compare-and-swap loop to update the value in an atomic to an arbitrary value computed by a closure.

I've applied a few tweaks suggested by @mystor in this comment on the tracking issue: rust-lang#48655 (comment). Specifically, the load and store ordering arguments have been swapped to match with the orderings of `compare_exchange`, and the closure has been moved from the first to last argument.

Moving the closure to the last argument is a change away from other methods on the atomic types which place the ordering(s) last, but matches with the broad convention that closure arguments come last in functions. In particular, rustfmt style lays calls with multi-line closures out more cleanly when the closure comes last.
…tolnay

Stabilization of weak-into-raw

Closes rust-lang#60728.

There are also two removals of `#![feature(weak_into_raw)]` in the `src/tools/miri` submodule. How should I synchronize the changes with there?

* I can ignore it for now and once this gets merged, update the tool, send a pull request to that one and then reference the changes to rustc.
* I could try submitting the changes to miri first, but then the build would fail there, because the attribute would still be needed.

I think the first one is the correct one, extrapolating from the contributing guidelines (even though they speak about breaking the tools and this should not break it, as extra feature should not hurt).
Stabilize AtomicN::fetch_min and AtomicN::fetch_max

Some architectures (ARMv8.1 LSE and RISC-V) have specific instructions for atomic min/max which the compiler can only generate through explicit instrinsics.
Clarified the documentation for Formatter::precision

Added a note that `precision` is interpreted as max-width when formatting strings
Improve missing `@` in slice binding pattern diagnostics

Closes rust-lang#72373

Includes a new suggestion with `Applicability::MaybeIncorrect` confidence level.

Before:

```
 --> src/main.rs:5:19
  |
5 |         [h, ref ts..] => foo(c, n - h) + foo(ts, n),
  |                   -^
  |                   |
  |                   expected one of `,`, `@`, `]`, or `|`
  |                   help: missing `,`

error[E0308]: mismatched types
 --> src/main.rs:5:46
  |
5 |         [h, ref ts..] => foo(c, n - h) + foo(ts, n),
  |                                              ^^ expected slice `[u32]`, found `u32`
  |
  = note: expected reference `&[u32]`
             found reference `&u32`

error: aborting due to 2 previous errors
```

After:

```
error: expected one of `,`, `@`, `]`, or `|`, found `..`
 --> src/main.rs:5:20
  |
5 |         [h, ref ts..] => foo(c, n - h) + foo(ts, n),
  |                    ^^ expected one of `,`, `@`, `]`, or `|`
  |
help: if you meant to bind the contents of the rest of the array pattern into `ts`, use `@`
  |
5 |         [h, ref ts @ ..] => foo(c, n - h) + foo(ts, n),
  |                    ^

error: aborting due to previous error
```

r? @estebank
Added a codegen test for a recent optimization for overflow-checks=on

Closes rust-lang#58692
remove redundant `mk_const`

Taken from rust-lang#72675 as this is fairly unrelated and that PR is more difficult than I imagined,
so it may take some time until it lands.
…r=Mark-Simulacrum

Whitelist #[allow_internal_unstable]

This should hopefully work around rust-lang#65023, which currently makes almost every bootstrap fail for me.
…shtriplett

Clarify the documentation of `take`

This PR addresses the concerns of rust-lang#61222, adding an example for the behaviour of `Iterator::take` when there are less than `n` elements.
@JohnTitor
Copy link
Member Author

@bors r+ p=11 rollup=never

@bors
Copy link
Contributor

bors commented May 29, 2020

📌 Commit fb506af has been approved by JohnTitor

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label May 29, 2020
@JohnTitor JohnTitor added the rollup A PR which is a rollup label May 29, 2020
@bors
Copy link
Contributor

bors commented May 29, 2020

⌛ Testing commit fb506af with merge 77f95a8...

@LeSeulArtichaut
Copy link
Contributor

Hmm, that's a shame toolstate doesn't give you the errors in case of a build failure

@JohnTitor
Copy link
Member Author

JohnTitor commented May 29, 2020

@LeSeulArtichaut toolstate doesn't block PRs now unless it's regressed (see #69624) but Actions uses dummy toolstate repo so it fails unfortunately. Anyways actions isn't used as a gate for now and we could just ignore it.

@bors
Copy link
Contributor

bors commented May 29, 2020

☀️ Test successful - checks-azure
Approved by: JohnTitor
Pushing 77f95a8 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 29, 2020
@bors bors merged commit 77f95a8 into rust-lang:master May 29, 2020
@JohnTitor JohnTitor deleted the rollup-nni16m2 branch May 29, 2020 11:19
@LeSeulArtichaut
Copy link
Contributor

Oh, alright I thought that would make the PR fail 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.