Commit graph

317955 commits

Author SHA1 Message Date
Jacob Pratt
0041f221ea
Rollup merge of #150768 - bjorn3:llvm_intrinsic_no_fn_abi, r=wesleywiser
Don't compute FnAbi for LLVM intrinsics in backends

~~This removes support for `extern "unadjusted"` for anything other than LLVM intrinsics. It only makes sense in the context of calling LLVM intrinsics anyway as it exposes the way the LLVM backend internally represents types. Perhaps it should be renamed to `extern "llvm-intrinsic"`?~~

Follow up to https://github.com/rust-lang/rust/pull/148533
2026-02-12 00:41:06 -05:00
Jacob Pratt
b1b6533077
Rollup merge of #142680 - beetrees:sparc64-float-struct-abi, r=tgross35
Fix passing/returning structs with the 64-bit SPARC ABI

Fixes the 64-bit SPARC part of rust-lang/rust#115609 by replacing the current implementation with a new implementation modelled on the RISC-V calling convention code ([SPARC ABI reference](https://sparc.org/wp-content/uploads/2014/01/SCD.2.4.1.pdf.gz)).

Pinging `sparcv9-sun-solaris` target maintainers: @psumbera @kulikjak
Fixes rust-lang/rust#115336
Fixes rust-lang/rust#115399
Fixes rust-lang/rust#122620
Fixes https://github.com/rust-lang/rust/issues/147883
r? @workingjubilee
2026-02-12 00:41:05 -05:00
Jacob Pratt
c509454f89
Rollup merge of #142415 - xizheyin:141679, r=estebank
Add note when inherent impl for a alias type defined outside of the crate

Fixes rust-lang/rust#141679

r? compiler
2026-02-12 00:41:05 -05:00
bors
5fdff787e6 Auto merge of #152484 - matthiaskrgr:rollup-h4u26eb, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#152419 (Move more query system code)
 - rust-lang/rust#152431 (Restrict the set of things that const stability can be applied to)
 - rust-lang/rust#152436 (Reenable a GCI+mGCA+GCPT test case)
 - rust-lang/rust#152021 (Bump tvOS, visionOS and watchOS Aarch64 targets to tier 2)
 - rust-lang/rust#152146 (mGCA: Add associated const type check)
 - rust-lang/rust#152372 (style: remove unneeded trailing commas)
 - rust-lang/rust#152383 (BikeshedGuaranteedNoDrop trait: add comments indicating that it can be observed on stable)
 - rust-lang/rust#152397 (Update books)
 - rust-lang/rust#152441 (Fix typos and grammar in top-level and src/doc documentation)
2026-02-11 22:07:19 +00:00
bors
7057231bd7 Auto merge of #152428 - nikic:llvm-22-rc3, r=dianqk
Update to LLVM 22.1.0-rc3

Update to LLVM 22.1.0-rc3, plus a cherry-pick of https://github.com/llvm/llvm-project/pull/179631 which is still pending backport upstream.

Fixes https://github.com/rust-lang/rust/issues/151926.
Fixes https://github.com/rust-lang/rust/issues/151832.
Fixes https://github.com/rust-lang/rust/issues/151818.
Fixes https://github.com/rust-lang/rust/issues/151807.
Fixes [#t-compiler/help > Inlining causing function to get replace with TRAP](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/Inlining.20causing.20function.20to.20get.20replace.20with.20TRAP/with/568824178).

Should also address https://github.com/rust-lang/rust/issues/131745, but we should verify that separately.
2026-02-11 16:57:29 +00:00
Matthias Krüger
f1956632f6
Rollup merge of #152441 - him2him2:fix-typos-docs, r=ehuss
Fix typos and grammar in top-level and src/doc documentation

Fix contextual typos and grammar issues in top-level and src/doc documentation that automated spellcheckers miss:

- `CONTRIBUTING.md`: add missing verb "is"
- `INSTALL.md`: fix subject-verb agreement ("requires" → "require")
- `RELEASES.md`: fix 4 issues (previous → previously, remove extra "is", add hyphen in Rust-for-Linux, results → result)
- `src/doc/not_found.md`: fix misspelling ("Standary" → "Standard")
- `src/doc/index.md`: fix awkward grammar in Embedded Rust Book description

No functional changes.
2026-02-11 13:48:52 +01:00
Matthias Krüger
e233a4e994
Rollup merge of #152397 - rustbot:docs-update, r=ehuss
Update books

## rust-lang/book

1 commits in 39aeceaa3aeab845bc4517e7a44e48727d3b9dbe..05d114287b7d6f6c9253d5242540f00fbd6172ab
2026-02-03 15:19:04 UTC to 2026-02-03 15:19:04 UTC

- Temporarily remove the link to `Drop::drop` (rust-lang/book#4576)

## rust-lang/nomicon

1 commits in 050c002a360fa45b701ea34feed7a860dc8a41bf..b8f254a991b8b7e8f704527f0d4f343a4697dfa9
2026-01-29 12:15:01 UTC to 2026-01-29 12:15:01 UTC

- Fix deprecation warning for compare_and_swap in atomics.md (rust-lang/nomicon#519)

## rust-lang/reference

12 commits in 990819b86c22bbf538c0526f0287670f3dc1a67a..addd0602c819b6526b9cc97653b0fadca395528c
2026-02-04 14:35:59 UTC to 2026-01-26 18:02:14 UTC

- const-eval.const-expr.field: make paragraph more clear (rust-lang/reference#2157)
- make more clear what the link target is (rust-lang/reference#2156)
- Update two URLs (rust-lang/reference#2154)
- Add a chapter on divergence (rust-lang/reference#2067)
- Guarantee `repr(C)` union field offset (rust-lang/reference#2128)
- Reference updates for forbidding object lifetime changing pointer casts (rust-lang/reference#1951)
- Clarify only arrays undergo unsized coercion during dispatch (rust-lang/reference#2139)
- Split the textual chapter into separate char and str chapters (rust-lang/reference#2145)
- Document ppc inline asm support (rust-lang/reference#2056)
- Unwrap items, expressions, patterns, and types (rust-lang/reference#2141)
- undefined behavior: add missing plural in `undefined.misaligned.ptr` (rust-lang/reference#2146)
- inline-assembly: add a space to the `asm.abi-clobbers.many` example (rust-lang/reference#2144)
2026-02-11 13:48:51 +01:00
Matthias Krüger
336debab2e
Rollup merge of #152383 - RalfJung:BikeshedGuaranteedNoDrop, r=TaKO8Ki
BikeshedGuaranteedNoDrop trait: add comments indicating that it can be observed on stable

Not sure if that's worth it, maybe this goes without saying for all these builtin traits?
2026-02-11 13:48:50 +01:00
Matthias Krüger
dbb1c20f47
Rollup merge of #152372 - nyurik:clippy-rustc_trait_selection, r=mati865
style: remove unneeded trailing commas

Make format-like macro calls look similar to what `cargo fmt` does automatically - remove trailing commas. When removing a comma, I also inlined some variables for consistency and clarity.

I'm working on a [clippy lint](https://github.com/rust-lang/rust-clippy/pull/16530) to make this process automatic.
2026-02-11 13:48:49 +01:00
Matthias Krüger
9a4ce0b5f7
Rollup merge of #152146 - zedddie:mgca-improve-const-bindings-wfck, r=BoxyUwU
mGCA: Add associated const type check

rust-lang/rust#151642

r? BoxyUwU

I didn't bless tests just yet as it only fixes the dyn arm
2026-02-11 13:48:49 +01:00
Matthias Krüger
92e3972ca7
Rollup merge of #152021 - madsmtm:tvos-visionos-watchos-tier-2, r=shepmaster
Bump tvOS, visionOS and watchOS Aarch64 targets to tier 2

Promote the following targets to Tier 2 without host tools:
- `aarch64-apple-tvos`.
- `aarch64-apple-tvos-sim`.
- `aarch64-apple-watchos`.
- `aarch64-apple-watchos-sim`.
- `aarch64-apple-visionos`.
- `aarch64-apple-visionos-sim`.

This implements MCP https://github.com/rust-lang/compiler-team/issues/918. Fixes https://github.com/rust-lang/rust/issues/151705.

r? shepmaster
2026-02-11 13:48:48 +01:00
Matthias Krüger
6c8bbfed38
Rollup merge of #152436 - fmease:reenable-gci-test-case, r=mati865
Reenable a GCI+mGCA+GCPT test case

The GCI+mGCA+GCPT test case can now be made to work with the necessary features and tweaks.
2026-02-11 13:48:48 +01:00
Matthias Krüger
88eda646f2
Rollup merge of #152431 - oli-obk:limited_stability_attr, r=jdonszelmann
Restrict the set of things that const stability can be applied to

r? @jdonszelmann
2026-02-11 13:48:47 +01:00
Matthias Krüger
2194af9680
Rollup merge of #152419 - nnethercote:mv-more-query-system-code, r=Zalathar
Move more query system code

Towards the goal of eliminating `rustc_query_system`, this commit moves some code from `rustc_query_system` to `rustc_middle` and `rustc_query_impl`, and from `rustc_middle` to `rustc_query_impl`.

r? @Zalathar
2026-02-11 13:48:46 +01:00
bors
7dc2e92b83 Auto merge of #152240 - weihanglo:update-cargo, r=weihanglo
Update cargo submodule

27 commits in fe2f314aef06e688a9517da1ac0577bb1854d01f..0c9e687d237ff04b53ccb67b4ce63e9483789e88
2026-01-30 21:52:01 +0000 to 2026-02-11 05:58:30 +0000
- chore: downgrade to libc@0.2.180 (rust-lang/cargo#16624)
- fix(script): Load config relative to the script (rust-lang/cargo#16620)
- fix(lints): Don't run on-by-default lints when MSRV is too old (rust-lang/cargo#16618)
- fix(build): Remove deprecated, unstable --out-dir (rust-lang/cargo#16608)
- fix(script): Make the lockfile script-specific independent of build-dir (rust-lang/cargo#16619)
- fix(lockfile-path): Respect the config in fix, install (rust-lang/cargo#16617)
- chore: upgrade to gix@0.79.0 (rust-lang/cargo#16615)
- chore: downgrade to libc@0.2.179 (rust-lang/cargo#16613)
- feat(timings): Enable text selection in the charts (rust-lang/cargo#16607)
- Add host.runner for wrapping host build target executions (rust-lang/cargo#16599)
- feat(schema): Add `impl Copy for RustVersion` (rust-lang/cargo#16609)
- refactor(lints): Cleanup (rust-lang/cargo#16610)
- refactor(timings): Remove `CanvasRenderer` in favor of `SvgRenderer` (rust-lang/cargo#16602)
- Fix known hosts parsing (rust-lang/cargo#16596)
- chore: pin openssl-src to 300.5.4 (rust-lang/cargo#16601)
- chore(deps): bump time from 0.3.46 to 0.3.47 (rust-lang/cargo#16593)
- feat(lints): Add missing_lints_inheritance  (rust-lang/cargo#16588)
- chore(deps): bump git2 from 0.20.3 to 0.20.4 (rust-lang/cargo#16589)
- chore(deps): update msrv (3 versions) to v1.91 (rust-lang/cargo#16587)
- feat(lints): Add unused_workspace_package_fields lint (rust-lang/cargo#16585)
- Add command field to BuildStarted in build-analysis (rust-lang/cargo#16577)
- Fix link for lockfile-publish-time (rust-lang/cargo#16582)
- docs(cli): Discuss commands and aliases (rust-lang/cargo#16581)
- fix(script): Correct style of help message (rust-lang/cargo#16580)
- chore(deps): update compatible (rust-lang/cargo#16578)
- chore(deps): update crate-ci/typos action to v1.42.3 (rust-lang/cargo#16579)
- fix(timings): Only compute `y_ticks` when the `units` is not empty. (rust-lang/cargo#16575)
2026-02-11 12:47:14 +00:00
Weihang Lo
d517ca282f
Update cargo submodule 2026-02-11 14:46:47 +08:00
bors
d34f1f9314 Auto merge of #152420 - tgross35:update-builtins, r=tgross35
compiler-builtins subtree update

Subtree update of `compiler-builtins` to 6a67a9f627.

Created using https://github.com/rust-lang/josh-sync.

r? @ghost
2026-02-11 04:12:19 +00:00
bors
7b25457166 Auto merge of #151943 - Zalathar:cache-on-disk, r=TaKO8Ki
Clean up query macros for `cache_on_disk_if`

This PR aims to make the macros for dealing with `cache_on_disk_if` a bit easier to read and work with.

There should be no change to compiler behaviour.
2026-02-10 20:57:44 +00:00
Mads Marquart
4fa388cb52 Disable profiler runtime on tvOS and watchOS 2026-02-10 17:42:13 +01:00
Mads Marquart
4a01f22a3e Bump tvOS, visionOS and watchOS Aarch64 targets to tier 2 2026-02-10 17:42:12 +01:00
bors
9e79395f92 Auto merge of #151509 - Zoxc:gen-color-race, r=zetanumbers,petrochenkov
Handle race when coloring nodes concurrently as both green and red

This fixes a race where a duplicate dep node gets written to the dep graph if a node was marked as green and promoted during execution, then marked as red after execution.

This can occur when a `no_hash` query A depends on a query B which cannot be forced so it was not colored when starting execution of query A. During the execution of query A it will execute query B and color it green. Before A finishes another thread tries to mark A green, this time succeeding as B is now green, and A gets promoted and written to metadata. Execution of A then finishes and because it's `no_hash` we assume the result changed and thus we color the node again, now as red and write it to metadata again. This doesn't happen with non-`no_hash` queries as they will be green if all their dependencies are green.

This changes the code coloring nodes red to also use `compare_exchange` to deal with this race ensuring that the coloring of nodes only happens once.

Fixes rust-lang/rust#150018
Fixes rust-lang/rust#142778
Fixes rust-lang/rust#141540
2026-02-10 16:17:00 +00:00
ron
da80677d6a Fix typos and grammar in top-level and src/doc documentation
- CONTRIBUTING.md: add missing verb "is"
- INSTALL.md: fix subject-verb agreement ("requires" → "require")
- RELEASES.md: fix 4 issues (previous → previously, remove extra "is",
  add hyphen in Rust-for-Linux, results → result)
- src/doc/not_found.md: fix misspelling ("Standary" → "Standard")
- src/doc/index.md: fix awkward grammar in Embedded Rust Book description
2026-02-10 10:22:19 -05:00
bors
d00ba92259 Auto merge of #152437 - JonathanBrouwer:rollup-bWpnWOz, r=JonathanBrouwer
Rollup of 10 pull requests

Successful merges:

 - rust-lang/rust#152364 (Port a lot of attributes to the new parser)
 - rust-lang/rust#151954 (Add help message suggesting explicit reference cast for From/TryFrom)
 - rust-lang/rust#152148 (Move `impl Interner for TyCtxt` to its own submodule)
 - rust-lang/rust#152226 (Modernize diagnostic for indeterminate trait object lifetime bounds)
 - rust-lang/rust#152351 (Remove `SubdiagMessage` in favour of the identical `DiagMessage`)
 - rust-lang/rust#152417 (Move the needs-drop check for `arena_cache` queries out of macro code)
 - rust-lang/rust#150688 (typeck: Make it clearer that `check_pat_lit` only handles literal patterns)
 - rust-lang/rust#152293 (Format heterogeneous try blocks)
 - rust-lang/rust#152355 (Update documentation of rustc_macros)
 - rust-lang/rust#152396 (Uplift `Predicate::allow_normalization` to `rustc_type_ir`)
2026-02-10 12:04:24 +00:00
Jonathan Brouwer
083622cdd0
Rollup merge of #152396 - ShoyuVanilla:uplift-allow-normalize, r=lcnr
Uplift `Predicate::allow_normalization` to `rustc_type_ir`

Found this FIXME comment while fixing a bug in rust-analyzer 😄
cc https://github.com/rust-lang/rust-analyzer/pull/21611

r? types
2026-02-10 13:00:49 +01:00
Jonathan Brouwer
faa15808cf
Rollup merge of #152355 - JonathanBrouwer:update-macro-doc, r=nnethercote
Update documentation of rustc_macros

Update the docs to reflect the changes in https://github.com/rust-lang/rust/issues/151366
2026-02-10 13:00:49 +01:00
Jonathan Brouwer
d9a86757c9
Rollup merge of #152293 - ia0:try_blocks_heterogeneous, r=ytmimi
Format heterogeneous try blocks

The tracking issue for `try_blocks_heterogeneous` is https://github.com/rust-lang/rust/issues/149488.

This follows the formatting of homogeneous try blocks (feature `try_blocks`) by considering `try bikeshed <type>` to be the equivalent of `try` (in particular a single "token").

An alternative would be to permit breaking between `bikeshed` and `<type>`, but given that those 2 elements are an explicitly temporary part of the syntax, it doesn't seem worth it. There also doesn't seem to be any existing precedent breaking between a keyword and a type. It also doesn't seem to be useful in practice, given that the type itself doesn't break (which is how it works for the return type of closures) and has more chances to dominate the length in case a break is necessary.

Happy to adapt anything in case this formatting is not optimal.

The test is also copied from homogeneous try blocks with 2 additional test cases to demonstrate the behavior with long types.

See [#t-lang > try blocks @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/213817-t-lang/topic/try.20blocks/near/572387493) for context.
2026-02-10 13:00:48 +01:00
Jonathan Brouwer
b5cf35214f
Rollup merge of #150688 - Zalathar:check-pat-lit, r=petrochenkov
typeck: Make it clearer that `check_pat_lit` only handles literal patterns

Nowadays, the `hir::PatExprKind` enum guarantees that “expressions” in patterns can only be paths or literals.

`PatExprKind::Path` is already handled by the previous match arm, so we can make this match arm explicitly match on `PatExprKind::Lit` without losing exhaustiveness.

There should be no actual change to compiler behaviour.
2026-02-10 13:00:48 +01:00
Jonathan Brouwer
5541e5c057
Rollup merge of #152417 - Zalathar:arena-alloc, r=nnethercote
Move the needs-drop check for `arena_cache` queries out of macro code

This is slightly simpler than before, because now the macro only needs to call a single function, and can just unconditionally supply `tcx` and a typed arena.

There should be no actual change to compiler behaviour.
2026-02-10 13:00:47 +01:00
Jonathan Brouwer
70ef5048d4
Rollup merge of #152351 - JonathanBrouwer:remove_subdiag, r=nnethercote
Remove `SubdiagMessage` in favour of the identical `DiagMessage`

For https://github.com/rust-lang/rust/issues/151366
Just some more cleanup :)
SubdiagMessage is now identical to DiagMessage, so there's no point in having both of them
2026-02-10 13:00:47 +01:00
Jonathan Brouwer
2af7bc0e17
Rollup merge of #152226 - fmease:modernize-indeterminate-object-lifetime-diag, r=chenyukang
Modernize diagnostic for indeterminate trait object lifetime bounds

* remove suggestion from the diagnostic message (bad style, too long) and turn it into a structured suggestion
* replace *object type* with *trait object type* since the former is an outdated term
2026-02-10 13:00:46 +01:00
Jonathan Brouwer
2aaf3a19d5
Rollup merge of #152148 - Zalathar:tcx-interner, r=petrochenkov
Move `impl Interner for TyCtxt` to its own submodule

This impl is several hundred lines of mostly self-contained, mostly boilerplate code that can be extracted out of the dauntingly large `rustc_middle::ty::context` module.

- The trait and its impl were introduced by https://github.com/rust-lang/rust/pull/97287.

---

There should be no change to compiler behaviour.
2026-02-10 13:00:45 +01:00
Jonathan Brouwer
39bb68119d
Rollup merge of #151954 - Muhtasim-Rasheed:issue-109829-help-message, r=eholk
Add help message suggesting explicit reference cast for From/TryFrom

Closes rust-lang/rust#109829

Improves E0277 diagnostics when a `From` or `TryFrom` implementation is expected, but the provided type is a reference that can be explicitly cast to a type the trait can convert from.
2026-02-10 13:00:45 +01:00
Jonathan Brouwer
935904f534
Rollup merge of #152364 - jdonszelmann:port-a-lot, r=jonathanbrouwer
Port a lot of attributes to the new parser

r? @JonathanBrouwer

See commits for which attributes
2026-02-10 13:00:44 +01:00
Folkert de Vries
c9b5c934ca
Fix passing/returning structs with the 64-bit SPARC ABI
Co-authored-by: beetrees <b@beetr.ee>
2026-02-10 12:39:45 +01:00
León Orell Valerian Liehr
32e49a8b40
Reenable a GCI+mGCA+GCPT test case 2026-02-10 12:04:09 +01:00
Jana Dönszelmann
12dbc1bc63
remove 'static in many places 2026-02-10 10:48:46 +01:00
Oli Scherer
475b9d9819 Prevent const stability attrs from being applied to macros via the normal attribute logic instead of special cased checks 2026-02-10 09:48:03 +00:00
Oli Scherer
628c37afad Restrict the set of things that const stability can be applied 2026-02-10 09:36:59 +00:00
Jana Dönszelmann
fe7530cad2
Make rustc_object_lifetime_default use NoArgsAttributeParser 2026-02-10 10:36:16 +01:00
Jana Dönszelmann
eab26e329b
Port rustc_no_mir_inline to the new attribute parser 2026-02-10 10:25:19 +01:00
Jana Dönszelmann
f4c135f91b
Port rustc_trivial_field_reads to the new attribute parser 2026-02-10 10:19:08 +01:00
Jonathan Brouwer
2377d355ad
Update documentation of rustc_macros 2026-02-10 10:17:59 +01:00
Jana Dönszelmann
954f483557
Port rustc_never_type_options to the new attribute parser 2026-02-10 10:17:24 +01:00
Jonathan Brouwer
ea361287be Remove SubdiagMessage in favour of the identical DiagMessage 2026-02-10 09:13:45 +00:00
Nikita Popov
1c45618335 Update to LLVM 22 rc 3 2026-02-10 10:11:25 +01:00
Jana Dönszelmann
a17eb934db
Port rustc_capture_analysis to the new attribute parser 2026-02-10 10:10:38 +01:00
Jana Dönszelmann
9d10b2ff37
Port rustc_conversion_suggestion to the new attribute parser 2026-02-10 10:10:38 +01:00
Jana Dönszelmann
9cc2924959
Port rustc_deprecated_safe_2024 to the new attribute parser 2026-02-10 10:10:38 +01:00
Jana Dönszelmann
00fef81964
Port rustc_expected_cgu_reuse to the new attribute parser 2026-02-10 10:10:38 +01:00
Oli Scherer
0ebd56ebbb Remove accidental const stability marker on a struct 2026-02-10 09:02:31 +00:00