Commit graph

53714 commits

Author SHA1 Message Date
Jonathan Brouwer
018a5efcf7
Rename inline_fluent! to msg! 2026-02-14 13:47:52 +01:00
bors
3f808f29e6 Auto merge of #152602 - jhpratt:rollup-uaxGseW, r=jhpratt
Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#151998 (Set hidden visibility on naked functions in compiler-builtins)
 - rust-lang/rust#149460 (rustdoc: sort stable items first)
 - rust-lang/rust#152076 (Feed `ErrorGuaranteed` from late lifetime resolution errors through to bound variable resolution)
 - rust-lang/rust#152471 (improve associated-type suggestions from bounds)
 - rust-lang/rust#152573 (move `escape_symbol_name` to `cg_ssa`)
 - rust-lang/rust#152594 (c-variadic: implement `va_arg` for `wasm64`)
 - rust-lang/rust#151386 (rustdoc: more js cleanup)
 - rust-lang/rust#152567 (nix-dev-shell: fix a typo)
 - rust-lang/rust#152568 (Port `#[lang]` and `#[panic_handler]` to the new attribute parsers)
 - rust-lang/rust#152575 (layout_of unexpected rigid alias delayed bug)
 - rust-lang/rust#152587 (A couple of tiny polonius things)
2026-02-14 06:23:09 +00:00
Jacob Pratt
4bcbf6274a
Rollup merge of #152587 - lqd:tiny-things, r=jackh726
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
2026-02-13 22:26:36 -05:00
Jacob Pratt
8125a56f07
Rollup merge of #152575 - lcnr:layout-error-to-delayed-bug, r=jackh726
layout_of unexpected rigid alias delayed bug

fixes rust-lang/rust#152545. The trait solver can keep aliases as rigid even if they are not well-formed d7daac06d8/compiler/rustc_next_trait_solver/src/solve/normalizes_to/mod.rs (L315-L345)

r? types
2026-02-13 22:26:36 -05:00
Jacob Pratt
22f973db34
Rollup merge of #152568 - JonathanBrouwer:port_lang, r=jdonszelmann
Port `#[lang]` and `#[panic_handler]` to the new attribute parsers

For https://github.com/rust-lang/rust/issues/131229#issuecomment-2971351163

r? @jdonszelmann
2026-02-13 22:26:35 -05:00
Jacob Pratt
61dee57441
Rollup merge of #152594 - folkertdev:va-list-wasm64, r=alexcrichton
c-variadic: implement `va_arg` for `wasm64`

tracking issue: https://github.com/rust-lang/rust/issues/44930

A LLVM maintainer of the wasm backend confirmed that the behavior on wasm64 is intented: the slot size is 4 on both wasm32 and wasm64. https://github.com/llvm/llvm-project/pull/173580#issuecomment-3900118960

r? workingjubilee
cc @alexcrichton as target maintainer
2026-02-13 22:26:34 -05:00
Jacob Pratt
202f102914
Rollup merge of #152573 - usamoi:escape-2, r=bjorn3
move `escape_symbol_name` to `cg_ssa`

followup of rust-lang/rust#151955

r? @bjorn3
2026-02-13 22:26:33 -05:00
Jacob Pratt
b80512462f
Rollup merge of #152471 - JohnTitor:sugg-assoc-items-from-bounds, r=estebank
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
2026-02-13 22:26:33 -05:00
Jacob Pratt
000d1f18bc
Rollup merge of #152076 - eggyal:undeclared-object-lifetime, r=fmease
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.

Fixes rust-lang/rust#152014
r? fmease
2026-02-13 22:26:32 -05:00
Jacob Pratt
4571317d32
Rollup merge of #151998 - zmodem:naked_visibility.squash, r=saethlin,bjorn3
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.
2026-02-13 22:26:31 -05:00
bors
29fa07e3db Auto merge of #149389 - ShoyuVanilla:local-region-param-wf, r=lcnr
WF check lifetime bounds for locals with type params

FCP proposal in https://github.com/rust-lang/rust/pull/149389#issuecomment-3669689488

Fixes rust-lang/rust#115175
Fixes rust-lang/rust#148854
2026-02-14 02:52:05 +00:00
Folkert de Vries
cc9e8c9716
c-variadic: implement va_arg for wasm64 2026-02-14 00:51:10 +01:00
bors
f403dee04e Auto merge of #152574 - JonathanBrouwer:rollup-ERc05AE, r=JonathanBrouwer
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)
2026-02-13 23:16:29 +00:00
bors
a423f68a0d Auto merge of #152533 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update

r? @Manishearth 

1 week late, due to vacation and some technical issues.
2026-02-13 18:09:00 +00:00
Rémy Rakic
be204dd047 make per-point liveness accessible
It avoids round-tripping through `Location`s if you're working with
`Point`s already.
2026-02-13 17:10:29 +00:00
Alan Egerton
c43a33eec7
Feed ErrorGuaranteed from late lifetime resolution to RBV
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.
2026-02-13 16:24:39 +00:00
Jonathan Brouwer
ee8ca0a89f Port #[panic_handler] to the new attribute parsers 2026-02-13 16:05:17 +00:00
Jonathan Brouwer
c61c2603cf Port #[lang] to the new attribute parsers 2026-02-13 16:04:19 +00:00
lcnr
b3d9fbc172 ICE to delayed bug 2026-02-13 13:50:43 +00:00
Jonathan Brouwer
d93a38a488
Rollup merge of #152565 - Kivooeo:ctor-diag, r=BoxyUwU
fix missleading error for tuple ctor

r? BoxyUwU

fixes https://github.com/rust-lang/rust/issues/151414
2026-02-13 13:35:04 +01:00
Jonathan Brouwer
1944af691e
Rollup merge of #152554 - JonathanBrouwer:remove_deprecated_safe, r=jdonszelmann
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
2026-02-13 13:35:03 +01:00
Jonathan Brouwer
fd598ebac8
Rollup merge of #152440 - him2him2:fix-typos-compiler, r=Kivooeo,Kobzol
Fix typos and grammar in compiler and build documentation

Fix contextual typos and grammar issues in compiler and build docs that automated spellcheckers miss:

- `compiler/rustc_codegen_llvm/src/debuginfo/doc.md`: fix 5 issues (adaption → adaptation, "allow to" → "allow V-ing" x3, later → latter + plural)
- `compiler/rustc_thread_pool/src/sleep/README.md`: fix 2 issues (idle → active per context, then → than)
- `src/bootstrap/README.md`: fix 2 issues (rust → Rust, add missing article "the")
- `src/ci/docker/README.md`: fix 2 issues ("come form" → "come from", grammar)

No functional changes.
2026-02-13 13:35:02 +01:00
Jonathan Brouwer
e91d02a8c3
Rollup merge of #152392 - TaKO8Ki:missing-generics-in-traits-used-in-const, r=jieyouxu
Fix ICE in supertrait_vtable_slot when supertrait has missing generics

Fixes rust-lang/rust#151330
2026-02-13 13:35:01 +01:00
Jonathan Brouwer
f1b935d08f
Rollup merge of #152356 - JonathanBrouwer:inline_diag4, r=jdonszelmann
Improve the `inline_fluent!` macro

For https://github.com/rust-lang/rust/issues/151366

This PR turns `inline_fluent!` into a proc macro, so we can run validation on the messages in this macro :)
I started a thread here because I don't like the name of the macro, but that's for a future PR: [#t-compiler > Bikeshed the new `inline_fluent!` macro](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Bikeshed.20the.20new.20.60inline_fluent!.60.20macro/with/572646242)
2026-02-13 13:35:01 +01:00
Jonathan Brouwer
98e8f99bc0
Rollup merge of #152218 - adwinwhite:fix-mir-borrowck-opaque-handling-keep-all-errors, r=lcnr
Report unconstrained region in hidden types lazily

Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/264

I didn't copy the mechanism of HIR typeck as I found that we just need to be lax in the unconstrained region case.
It already ignores non-defining uses and invalid params.

About tests, I'm having trouble coming up with more complex ones. 🙁

This fixes `ukanren` and `codecrafters-redis-rust` but not rust-lang/rust#151322 and rust-lang/rust#151323.
I believe they are a [different problem](https://github.com/rust-lang/rust/issues/151322#issuecomment-3864656974).

r? @lcnr
2026-02-13 13:35:00 +01:00
Jonathan Brouwer
a211e2fbba
Rollup merge of #152555 - JonathanBrouwer:port_diagnostic_item, r=jdonszelmann
Port `#[rustc_diagnostic_item]` to the new attribute parsers

r? @jdonszelmann
2026-02-13 13:34:59 +01:00
Jonathan Brouwer
6fa5694807
Rollup merge of #152515 - Zalathar:dep-kind-vtables, r=nnethercote
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)
2026-02-13 13:34:59 +01:00
Jonathan Brouwer
65d982abd8
Rollup merge of #152469 - mu001999-contrib:cleanup/unused-features, r=nadrieril,jdonszelmann
Remove unused features

Detected by https://github.com/rust-lang/rust/pull/152164.

~~Only allow `unused_features` if there are complex platform-specific features enabled.~~
2026-02-13 13:34:58 +01:00
Jonathan Brouwer
9d662b5815
Rollup merge of #152323 - JohnTitor:issue-135845-2, r=lcnr
Fix ICE in borrowck when recovering `fn_sig` for `-> _`

(Should be) a proper fix for rust-lang/rust#135845, replaces a dummy binder with a concrete one not to ICE, as mentioned in https://github.com/rust-lang/rust/pull/147631#issuecomment-3460724226.
Fixes rust-lang/rust#135845
r? @lcnr @jackh726
2026-02-13 13:34:58 +01:00
usamoi
4796ff1bf5 move escape_symbol_name to cg_ssa 2026-02-13 20:31:18 +08:00
Zalathar
1d6ef95075 Extract DepKindVTable constructors to their own module 2026-02-13 23:19:20 +11:00
Kivooeo
f63007cd3b fix missleading error for tuple ctor 2026-02-13 09:54:04 +00:00
Jonathan Brouwer
cbc661022e Port #[rustc_diagnostic_item] to the new attribute parsers 2026-02-13 09:46:47 +00:00
Yuki Okushi
391a395158 Improve diagnostics following reviews 2026-02-13 16:41:47 +09:00
Yuki Okushi
a8d7a47927 improve associated-type suggestions from bounds 2026-02-13 16:41:47 +09:00
Yuki Okushi
b0f2ac8797 Return Binder 2026-02-13 14:06:30 +09:00
Stuart Cook
b9ce1e0369
Rollup merge of #152552 - androm3da:hexagon-hvx-abi-rules, r=madsmtm
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.
2026-02-13 15:19:15 +11:00
Stuart Cook
9e0a05b481
Rollup merge of #152550 - Ozzy1423:rustc-attrs, r=JonathanBrouwer
Port #[prelude_import] to the attribute parser

Tracking issue: https://github.com/rust-lang/rust/issues/131229

r? @JonathanBrouwer

Didn't change any use-sites of it in the compiler
2026-02-13 15:19:15 +11:00
Stuart Cook
5266800936
Rollup merge of #152548 - dianne:reject-const-block-pat-pre-expansion, r=fmease
reject inline const patterns pre-expansion

Reverts the parser changes from https://github.com/rust-lang/rust/pull/149667

Fixes https://github.com/rust-lang/rust/issues/152499

Awkwardly, some cases of inline const pats can only be caught pre-expansion and some can only be caught post-expansion. https://github.com/rust-lang/rust/pull/149667 switched from only rejecting the former to only rejecting the latter.
2026-02-13 15:19:14 +11:00
Stuart Cook
426921007e
Rollup merge of #152519 - scottmcm:fix-152501, r=fmease
Fix feature gating for new `try bikeshed` expressions

r? fmease
Fixes rust-lang/rust#152501
2026-02-13 15:19:13 +11:00
Stuart Cook
8b036c7b72
Rollup merge of #152486 - fneddy:s390x_simplify_backchain, r=dingxiangfei2009
remove redundant backchain attribute in codegen

llvm will look at both
1. the values of `"target-features"` and
2. the function string attributes.

this patch removes the redundant function string attribute because it is not needed at all. rustc sets the `+backchain` attribute through `target_features_attr(...)`
d34f1f9314/compiler/rustc_codegen_llvm/src/attributes.rs (L590)
d34f1f9314/compiler/rustc_codegen_llvm/src/attributes.rs (L326-L337)
2026-02-13 15:19:13 +11:00
Stuart Cook
0c0af5c6a8
Rollup merge of #152444 - ShoyuVanilla:unsized-recursion-limit, r=lcnr
`-Znext-solver` Prevent committing unfulfilled unsized coercion

Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/266

r? lcnr
2026-02-13 15:19:12 +11:00
Stuart Cook
09720ec3d0
Rollup merge of #152329 - Zoxc:simple-parallel-macro, r=nnethercote
Simplify parallel! macro

This replaces the `parallel!` macro with a `par_fns` function.
2026-02-13 15:19:12 +11:00
Stuart Cook
1378e9efeb
Rollup merge of #152528 - bjorn3:lto_refactors11, r=petrochenkov
Support serializing CodegenContext

Follow up to https://github.com/rust-lang/rust/pull/149209
Part of https://github.com/rust-lang/compiler-team/issues/908
2026-02-13 15:19:10 +11:00
Stuart Cook
caca3d4f1a
Rollup merge of #152520 - Zalathar:traits-cache, r=dingxiangfei2009
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.
2026-02-13 15:19:10 +11:00
Stuart Cook
504bc6699c
Rollup merge of #152514 - Zalathar:job-map, r=nnethercote
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)
2026-02-13 15:19:09 +11:00
Stuart Cook
15e349d084
Rollup merge of #152496 - ZuseZ4:fix-autodiff-dbg-build, r=bjorn3
Fix multi-cgu+debug builds using autodiff by delaying autodiff till lto

fixes: https://github.com/rust-lang/rust/issues/152470

r? @bjorn3
2026-02-13 15:19:09 +11:00
Stuart Cook
bc3b9de404
Rollup merge of #152422 - Zoxc:query-macro-tweaks, r=Zalathar
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`
2026-02-13 15:19:08 +11:00
Stuart Cook
6c2700b256
Rollup merge of #150988 - chenyukang:yukang-fix-150899-macro-rules, r=petrochenkov
Improve code suggestion for incorrect macro_rules! usage

Fixes rust-lang/rust#150899
2026-02-13 15:19:08 +11:00
Adwin White
20c46d647f report unconstrained region in hidden types lazily 2026-02-13 11:38:53 +08:00