Most of the files within the `dep_graph` module can be moved wholesale
into `rustc_middle`. But two of them (`mod.rs` and `dep_node.rs`) have
the same name as existing files in `rustc_middle`, so for those I just
copied the contents into the existing files.
The commit also moves `QueryContext` and `incremental_verify_ich*`
because they are tightly intertwined with the dep graph code. And a
couple of error structs moved as well.
This includes the types `QueryInfo`, `QueryJob`, `QueryJobId`,
`QueryWaiter`, `QueryLatch`, and `QueryLatchInfo`.
`CycleError` and `QueryStack*` had to come along too, due to type
interdependencies. The `QueryStack*` types are put into a new submodule
`rustc_middle::query::stack`.
A couple of tiny polonius things
Here's a couple of tiny things I had ready to go @jackh726
- a tiny cleanup to avoid round-tripping through `Location`s to check for liveness, since we're already working with points
- while I was there, I fixed the doc which wasn't showing up properly (maybe a rustdoc or bootstrap bug when we build locally or during dist, either way, both don't show up correctly linked most of the time) for `PointIndex`es.
- and in the second commit slightly expand test coverage with [an example](https://internals.rust-lang.org/t/get-mut-map-back-from-entry-api/24003) that would have needed stdlib changes (cc author @Darksonn for visibility here)
More soon.
r? @jackh726
rustdoc: more js cleanup
Continuing the effort of removing `@ts-expect-error` from the codebase wherever possible, this time focusing on `main.js`. Found some oddities with `register_type_impls`, fixed most of them, but the one that I couldn't figure out is what's going on with `sidebarTraitList`. It's queried, then if there are any trait imps, unconditionally overwritten, then latter code assumes that one of these two things has initialized it, but it's not obvious why this would be the case, or if there's a reason this wasn't done in a more straightforwards way.
r? @GuillaumeGomez
improve associated-type suggestions from bounds
Should address invalid suggestions I could come up with, but the suggestion is too hand-crafted and invalid patterns may exist.
r? @estebank
Fix https://github.com/rust-lang/rust/issues/73321
Feed `ErrorGuaranteed` from late lifetime resolution errors through to bound variable resolution
If late lifetime resolution fails for whatever reason, forward to RBV the guarantee that an error was emitted - thereby eliminating the need for a "hack" to suppress subsequent/superfluous error diagnostics.
Fixesrust-lang/rust#152014
r? fmease
rustdoc: sort stable items first
Finally tackling this again now that the search system refactor is done. The tests and the general approach were taken from the original PR.
Set hidden visibility on naked functions in compiler-builtins
88b46460fa made builtin functions hidden, but it doesn't apply to naked functions, which are generated through a different code path.
This was discovered in rust-lang/rust#151486 where aarch64 outline atomics showed up in shared objects, overriding the symbols from compiler-rt.
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)
If late lifetime resolution fails for whatever reason, forward to RBV
the guarantee that an error was emitted - thereby eliminating the need
for a "hack" to suppress subsequent/superfluous error diagnostics.
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.