-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Rollup of 11 pull requests #72727
Conversation
Co-authored-by: Ralf Jung <post@ralfj.de>
Stabilizes rust-lang#60728.
… 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
…an-DPC Improve E0601 explanation r? @Dylan-DPC
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.
@bors r+ p=11 rollup=never |
📌 Commit fb506af has been approved by |
Hmm, that's a shame toolstate doesn't give you the errors in case of a build failure |
@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. |
☀️ Test successful - checks-azure |
Oh, alright I thought that would make the PR fail 😄 |
Successful merges:
@
in slice binding pattern diagnostics #72534 (Improve missing@
in slice binding pattern diagnostics)mk_const
#72711 (remove redundantmk_const
)take
#72720 (Clarify the documentation oftake
)Failed merges:
r? @ghost