Document workings of successors more clearly
This is an attempt to fix#135087 together with https://github.com/rust-lang/rust/pull/135886, but I am not sure if I've succeeded in adding much clarity here, so don't be shy with your comments.
Implement `&pin const self` and `&pin mut self` sugars
This PR implements part of #130494.
It introduces the sugars `&pin const self` and `&pin mut self` for `self: Pin<&Self>` and `self: Pin<&mut Self>`.
handle forced compiler and revert #137476
Fixes https://github.com/rust-lang/rust/issues/138004
I would appreciate it if we could measure CI pipelines with the current changes to see if this reduces recent CI overhead. cc `@rust-lang/infra`
try-job: dist-powerpc64le-linux
Avoid allocating a vector of small vectors merely to determine how many
predecessors each basic block has.
Additionally use u8 and saturating operations. The pass only needs to
distinguish between [0..1] and [2..].
While it shares more than zero code with the SysV x86-32 ABI impl,
there is no particular reason to organize wildly different ABIs
using if-else in the same function.
Inline `FnOnce`/`FnMut`/`Fn` shims once again
This PR fixes the argument checking for `extern "rust-call"` ABI functions with a spread arg, which do no expect their arguments to be exploded from a tuple like closures do.
Secondly, it removes the hack that prevented them from being inlined. This results in more work done by the compiler, but it does end up allowing us to inline functions we didn't before.
Fixes#137901
Rollup of 20 pull requests
Successful merges:
- #134063 (dec2flt: Clean up float parsing modules)
- #136581 (Retire the legacy `Makefile`-based `run-make` test infra)
- #136662 (Count char width at most once in `Formatter::pad`)
- #136764 (Make `ptr_cast_add_auto_to_object` lint into hard error)
- #136798 (Added documentation for flushing per #74348)
- #136865 (Perform deeper compiletest path normalization for `$TEST_BUILD_DIR` to account for compare-mode/debugger cases, and normalize long type file filename hashes)
- #136975 (Look for `python3` first on MacOS, not `py`)
- #136977 (Upload Datadog metrics with citool)
- #137240 (Slightly reformat `std::fs::remove_dir_all` error docs)
- #137298 (Check signature WF when lowering MIR body)
- #137463 ([illumos] attempt to use posix_spawn to spawn processes)
- #137477 (uefi: Add Service Binding Protocol abstraction)
- #137569 (Stabilize `string_extend_from_within`)
- #137633 (Only use implied bounds hack if bevy, and use deeply normalize in implied bounds hack)
- #137679 (Various coretests improvements)
- #137723 (Make `rust.description` more general-purpose and pass `CFG_VER_DESCRIPTION`)
- #137728 (Remove unsizing coercions for tuples)
- #137731 (Resume one waiter at once in deadlock handler)
- #137875 (mir_build: Integrate "simplification" steps into match-pair-tree creation)
- #138028 (compiler: add `ExternAbi::is_rustic_abi`)
r? `@ghost`
`@rustbot` modify labels: rollup
compiler: add `ExternAbi::is_rustic_abi`
Various parts of the compiler were hand-rolling this extremely simple check that is nonetheless easy to get wrong as the compiler evolves over time. Discourage them from being so "original" again by replacing it with a single implementation on the type that represents these ABIs. This simplifies a surprising amount of code as a result.
Also fixes#132981, an ICE that emerged due to other checks being made stricter.
mir_build: Integrate "simplification" steps into match-pair-tree creation
The “simplification” step helps to prepare THIR patterns for lowering into MIR, and originally dates back to the earliest days of MIR in the compiler.
Over time, various intermediate data structures have been introduced (e.g. `MatchPair`, later renamed to `MatchPairTree`) that reduce the need for a separate simplification step, because some of the necessary simplifications can be built into the construction of those intermediate structures instead. This PR continues that process to its logical conclusion and removes the simplification step entirely, by integrating its remaining responsibilities into match-pair-tree creation: flattening “irrefutable” nodes, collecting bindings/ascriptions in flat lists, and sorting or-patterns after other subpatterns.
This has a few immediate benefits:
- We can remove `TestCase::Irrefutable`, which was not allowed to exist after simplification, and was much larger than other test-case variants.
- We can make `MatchPairTree::place` non-optional, because only irrefutable nodes could fail to have a place.
In the future, this should also help with some ideas I have for simplifying how `AscribeUserType` and `ExpandedConstant` nodes are handled, by representing them as side-data keyed by THIR pattern ID, so that they are no longer their own kinds of THIR pattern node.
Resume one waiter at once in deadlock handler
When multiple query loop errors occur in the code, only one waiter should be resumed at a time to avoid waking up multiple waiters at the same time and causing deadlock due to thread grabbing.
This fixes the UI failures in #132051
cc `@Zoxc` `@cjgillot` `@nnethercote` `@bjorn3` `@Kobzol`
Zulip discussion [here](https://rust-lang.zulipchat.com/#narrow/channel/187679-t-compiler.2Fwg-parallel-rustc/topic/Deadlocks.20and.20Rayon)
Edit: We can't reproduce these bugs with the existing test suits, so we keep them until we merge #132051
UPDATES #129912
UPDATES #120757
UPDATES #129911