Rollup of 16 pull requests
Successful merges:
- rust-lang/rust#137494 (libstd: init(): dup() subsequent /dev/nulls instead of opening them again)
- rust-lang/rust#144541 (c-variadic: multiple ABIs in the same program for arm)
- rust-lang/rust#144613 (aarch64-nintendo-switch-freestanding - Enable CPU features that are always available in a live system (crypto instructions, plus explicit NEON).)
- rust-lang/rust#144780 (Add a method to dump MIR in the middle of MIR building)
- rust-lang/rust#145137 (Consolidate panicking functions in `slice/index.rs`)
- rust-lang/rust#145507 (Refactor attribute parsing to improve ergonomics and some diagnostics)
- rust-lang/rust#145604 (Gate static closures behind a parser feature)
- rust-lang/rust#145648 (Add two tidy dependency checks)
- rust-lang/rust#145661 (update some s390x codegen tests)
- rust-lang/rust#145672 (Instantiate higher-ranked binder with erased when checking `IntoIterator` predicate for query instability)
- rust-lang/rust#145689 (Migrate `panic_unwind` to use `cfg_select!`)
- rust-lang/rust#145700 (Handle `ReEarlyParam` in `type_name`.)
- rust-lang/rust#145703 (Remove MIPS targets from CI LLVM platforms)
- rust-lang/rust#145704 (ci: don't cleanup windows disk)
- rust-lang/rust#145705 (remove an `as` cast in prefetch codegen)
- rust-lang/rust#145712 (Update outdated link in bound region comments)
r? `@ghost`
`@rustbot` modify labels: rollup
Add two tidy dependency checks
Deny duplicate dependencies for the standard library as it would almost certainly bloat executables. And deny proc-macro dependencies for the standard library as they would break cross-compilation.
Gate static closures behind a parser feature
I'd like to gate `static ||` closures behind a feature gate, since we shouldn't allow people to take advantage of this syntax if it's currently unstable. Right now, since it's only rejected after ast lowering, it's accessible to macros.
Let's crater this to see if we can claw it back without breaking anyone's code.
Consolidate panicking functions in `slice/index.rs`
Consolidate all the panicking functions in `slice/index.rs` to use a single `slice_index_fail` function, similar to how it is done in `str/traits.rs`.
Split off from https://github.com/rust-lang/rust/pull/145024
Add a method to dump MIR in the middle of MIR building
This makes it easier to debug issues with MIR building by inserting dump_for_debugging calls around the suspected code responsible for the bad MIR.
aarch64-nintendo-switch-freestanding - Enable CPU features that are always available in a live system (crypto instructions, plus explicit NEON).
~~While some NEON and crypto features may not be supported on the Nintendo Switch at boot (e.g. on the a53 cores) and this has not been tested, the features will _always_ be available if running as a sysmodule or homebrew application under Horizon/Atmosphere.~~ EDIT: the a53 cores are fused out, these features are always available.
This has been tested with local tools personally, as well as building [emuiibo](https://github.com/XorTroll/emuiibo) as it uses both `sha` and `aes` primitives. This was tested using inline assembly in previous versions, and in current versions by using the `aes`, `ctr`, `hmac`, and `sha2` crates.
r? `@jam1garner`
This ended up being much delayed from our discussions about updating this. I tested a number of individual features such as the `aes` and `sha2` target-features directly to avoid a warning message with the `crypto` feature, but that appears to be caused by https://github.com/rust-lang/rust/issues/96472 and is not actually an issue.
There is also a decision to make here about explicitly enabling the `neon` feature. I am in favor of it to be explicit, but it is not necessary as it is already enabled by the `v8a` and `crypto` features. I will defer to your decision as it does not change the actual instructions available for codegen.
Download CI GCC into the correct directory
While doing various experiments with stage3 cross-compilations, I realized that bootstrap is unable to download LLVM from CI for a non-host target, which is quite annoying. Fixing this for LLVM will take some work, but in the meantime we can easily fix this for `download-ci-gcc`, which was implemented in a much more self-contained way.
Do not use effective_visibilities query for Adt types of a local trait while proving a where-clause
Partially fixrust-lang/rust#145611, but we should do something make cycle in this situation ICE.
Instead of using a query, call `&tcx.resolutions(()).effective_visibilities`.
r? `````@lcnr`````
cc `````@compiler-errors`````
Unconditionally-const supertraits are considered not dyn compatible
Let's save some space in the design of const traits by making `dyn Trait` where `trait Trait: const Super` not dyn compatible.
Such a trait cannot satisfy `dyn Trait: Trait`; we could in the future make this dyn compatible but *NOT* implement `Trait`, but that's a bit weird and seems like it needs to be independently justified moving forward.
Fixes https://github.com/rust-lang/rust/issues/145198
r? fee1-dead