Rollup of 14 pull requests
Successful merges:
- rust-lang/rust#152323 (Fix ICE in borrowck when recovering `fn_sig` for `-> _`)
- rust-lang/rust#152469 (Remove unused features)
- rust-lang/rust#152515 (Extract `DepKindVTable` constructors to their own module)
- rust-lang/rust#152555 (Port `#[rustc_diagnostic_item]` to the new attribute parsers)
- rust-lang/rust#152218 (Report unconstrained region in hidden types lazily)
- rust-lang/rust#152356 (Improve the `inline_fluent!` macro)
- rust-lang/rust#152392 (Fix ICE in supertrait_vtable_slot when supertrait has missing generics)
- rust-lang/rust#152407 (Add regression test for type_const with unit struct ctor under mGCA)
- rust-lang/rust#152440 (Fix typos and grammar in compiler and build documentation)
- rust-lang/rust#152536 (bootstrap: add explicit UTF-8 encoding to text-mode open() calls)
- rust-lang/rust#152554 (Remove `deprecated_safe` and its corresponding feature gate)
- rust-lang/rust#152556 (doc: move riscv64a23-unknown-linux-gnu to tier 2)
- rust-lang/rust#152563 (Replace "bug" with "issue" in triagebot ping messages)
- rust-lang/rust#152565 (fix missleading error for tuple ctor)
Failed merges:
- rust-lang/rust#152512 (core: Implement feature `float_exact_integer_constants`)
- rust-lang/rust#152296 (Port `rust_nonnull_optimization_guaranteed` and `rustc_do_not_const_check` to the new attribute parser)
doc: move riscv64a23-unknown-linux-gnu to tier 2
This updates the platform support documentation to reflect that "riscv64a23-unknown-linux-gnu" is now Tier 2.
-Docs-only change (no compiler/runtime behavior change).
Fixesrust-lang/rust#152539
Remove `deprecated_safe` and its corresponding feature gate
This unimplements the feature gate for tracking issue https://github.com/rust-lang/rust/issues/94978
The author of that tracking issue and the MCP seem to no longer exist
Afaik we can just do this, but let me know if I'm wrong
Because this feature has been idle for 3+ years, and it is in the way to finish the attribute refactoring (https://github.com/rust-lang/rust/issues/131229#issuecomment-2971351163)
When someone wants to do work on it the feature gate can be re-added
r? @jdonszelmann
bootstrap: add explicit UTF-8 encoding to text-mode open() calls
Make text-mode `open()` calls in `bootstrap.py`
explicitly use `encoding="utf-8"`.
This avoids relying on platform-dependent default encodings
when running Python < 3.15.
Binary-mode opens remain unchanged.
Extract `DepKindVTable` constructors to their own module
This is a fairly substantial chunk of code in `rustc_query_impl::plumbing` that mostly doesn't need to be inside a macro at all.
The part that does need to be in a macro is the declaration of a named vtable constructor function for each query. I have extracted that into its own separate call to `rustc_middle::rustc_with_all_queries!` in the new module, so that dep-kind vtable construction is almost entirely confined to `rustc_query_impl::dep_kind_vtables`.
There should be no change to compiler behaviour.
r? nnethercote (or compiler)
Add 2048-bit HvxVectorPair support to Hexagon SIMD ABI checks
Previously, rustc rejected HvxVectorPair types in function signatures because the HEXAGON_FEATURES_FOR_CORRECT_FIXED_LENGTH_VECTOR_ABI array only had entries for vectors up to 1024 bits. This caused the ABI checker to emit "unsupported vector type" errors for 2048-bit HvxVectorPair (used in 128-byte HVX mode).
Add 2048 byte entry to allow HvxVectorPair to be passed in extern "C" funcs when the hvx-length128b is enabled.
sparc64: enable abi compatibility test
fixes https://github.com/rust-lang/rust/issues/115336
We can now remove the exceptions for sparc64 from the abi compatibility tests (since https://github.com/rust-lang/rust/pull/142680).
I was also able to remove a cfg for mips64. The remaining (tested) issues seem to be around how `f64` is handled there.
cc @RalfJung
r? tgross35
Don't use `DepContext` in `rustc_middle::traits::cache`
- A nice little simplification unlocked by https://github.com/rust-lang/rust/pull/152199.
---
This code is now in `rustc_middle`, and doesn't need any non-trivial methods, so it can just use `TyCtxt` directly instead.
Collect active query jobs into struct `QueryJobMap`
This PR encapsulates the existing `QueryMap` type alias into a proper struct named `QueryJobMap`, which is used by code that wants to inspect the full set of currently-active query jobs.
Wrapping the query job map in a struct makes it easier to see how other code interacts with the map, and also lets us change some free functions for map lookup into methods.
We also do a renaming pass to consistently refer to the query job map as `job_map`, or as `job_map_out` in the places where it's a mutable out-parameter.
There should be no change to compiler behaviour.
r? nnethercote (or compiler)
Change query proc macro to be more rust-analyzer friendly
This changes the query proc macro to be more rust-analyzer friendly.
- Types in the macro now have a proper span
- Some functions have their span hidden so they don't show up when hovering over the query name
- Added a hint on the provider field on how to find providers. That is shown when hovering over the query name
- Linked query name to the provider field on all queries, not just ones with caching
- Added tooltip for the query modifiers by linking to the new types in `rustc_middle:::query::modifiers`
Compute localized outlives constraints lazily
This PR rewrites the loan liveness algorithm to compute localized constraints lazily during traversal, to avoid the sometimes costly conversion and indexing happening in the current eager algorithm (or for now as well, the need to reshape the liveness data to better list regions live at a given point).
It thus greatly reduces the current alpha overhead, although it wasn't entirely removed of course (we're obviously doing more work to improve precision): the worst offending benchmark has a +5-6% wall-time regression — but icounts are worse looking (+13%) rn.
Best reviewed per-commit, as steps are in sequence to simplify the process or unify some things.
r? @jackh726