Skip to content

rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing#150468

Merged
rust-bors[bot] merged 2 commits intorust-lang:mainfrom
Gelbpunkt:rustc-target-callconv-spec-elf-abi
Feb 22, 2026
Merged

rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing#150468
rust-bors[bot] merged 2 commits intorust-lang:mainfrom
Gelbpunkt:rustc-target-callconv-spec-elf-abi

Conversation

@Gelbpunkt
Copy link
Copy Markdown
Contributor

@Gelbpunkt Gelbpunkt commented Dec 28, 2025

View all comments

All PowerPC64 targets except AIX explicitly set the ABI in the target options. We can therefore stop hardcoding the ABI to be used based on the target environment or OS, except for the AIX special case.

The fallback based on endianness is kept for the sake of compatibility with custom targets.

This makes it so that big endian targets not explicitly accounted for before (powerpc64-unknown-openbsd) and targets that don't use the expected default ABI (big-endian ELFv2 Glibc targets) use the correct ABI in the calling convention code.

The second commit is a tiny change to validate the llvm_abiname set on PowerPC64(LE) targets. See the commit messages for details.

CC @RalfJung who pointed out the missing llvm_abiname validation

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Dec 28, 2025

These commits modify compiler targets.
(See the Target Tier Policy.)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 28, 2025
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Dec 28, 2025

r? @chenyukang

rustbot has assigned @chenyukang.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@chenyukang
Copy link
Copy Markdown
Member

@rustbot reroll

@rustbot rustbot assigned jieyouxu and unassigned chenyukang Jan 13, 2026
@jieyouxu
Copy link
Copy Markdown
Member

@rustbot reroll

@rustbot rustbot assigned fee1-dead and unassigned jieyouxu Jan 13, 2026
Comment thread compiler/rustc_target/src/spec/mod.rs Outdated
…instead of guessing

All PowerPC64 targets except AIX explicitly set the ABI in the target
options. We can therefore stop hardcoding the ABI to be used based on
the target environment or OS, except for the AIX special case.

The fallback based on endianness is kept for the sake of compatibility
with custom targets.

This makes it so that big endian targets not explicitly accounted for
before (powerpc64-unknown-openbsd) and targets that don't use the
expected default ABI (ELFv2 Glibc targets) use the correct ABI in the
calling convention code.
@Gelbpunkt Gelbpunkt force-pushed the rustc-target-callconv-spec-elf-abi branch from 35377f3 to b2e1f69 Compare January 13, 2026 14:56
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Jan 13, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

Comment thread compiler/rustc_target/src/spec/mod.rs Outdated
@Gelbpunkt Gelbpunkt force-pushed the rustc-target-callconv-spec-elf-abi branch from b2e1f69 to d40f0cd Compare January 13, 2026 15:33
Comment thread compiler/rustc_target/src/spec/mod.rs Outdated
… PowerPC64(LE)

PowerPC64 ELF targets (effectively anything that isn't AIX) use either
the ELFv1 or ELFv2 ABI. The ELFv1 ABI is only specified for big endian
targets, while ELFv2 can be used by both little- and big-endian targets.
Make sure that, if an LLVM ABI is set, it is set to one of the two. AIX
does not set an LLVM ABI name, so ensure that AIX targets don't set
anything other than an empty ABI name.
@Gelbpunkt Gelbpunkt force-pushed the rustc-target-callconv-spec-elf-abi branch from d40f0cd to 168f324 Compare January 15, 2026 03:00
@fee1-dead
Copy link
Copy Markdown
Member

@rustbot reroll

@rustbot rustbot assigned davidtwco and unassigned fee1-dead Jan 18, 2026
@RalfJung
Copy link
Copy Markdown
Member

r? me

This LGTM from by 10k foot view without knowing anything about the details of these ABIs ;) . However, do we have to worry about this breaking the ABI for anyone already using these targets?

Also, @workingjubilee I wouldn't mind a second opinion. :)

@rustbot rustbot assigned RalfJung and unassigned davidtwco Jan 18, 2026
@Gelbpunkt
Copy link
Copy Markdown
Contributor Author

However, do we have to worry about this breaking the ABI for anyone already using these targets?

Previously, this hardcoded the list of big-endian targets using ELFv2 to musl and FreeBSD, which was not kept up to date (OpenBSD is missing from here). Since all PowerPC64 targets now specify their ABI, we can stop hardcoding the list. It will not break the ABI for any of them, AFAICT this is strictly a fix for the OpenBSD target and makes it so there's one less part of the code we need to worry about when changing or adding new targets.

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Feb 22, 2026

Auto build cancelled. Cancelled workflows:

The next pull request likely to be tested is #152960.

rust-bors bot pushed a commit that referenced this pull request Feb 22, 2026
Rollup of 15 pull requests

Successful merges:

 - #150468 (rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing)
 - #151628 (Fix ICE in const eval of packed SIMD types with non-power-of-two element counts)
 - #151871 (don't use env with infer vars)
 - #152591 (Simplify internals of `{Rc,Arc}::default`)
 - #152865 (Fixed ByteStr not padding within its Display trait when no specific alignment is mentioned)
 - #152908 (Enable rust.remap-debuginfo in the dist profile)
 - #147859 (reduce the amount of panics in `{TokenStream, Literal}::from_str` calls)
 - #152705 (Test(lib/win/proc): Skip `raw_attributes` doctest under Win7)
 - #152767 (fix typo in `carryless_mul` macro invocation)
 - #152837 (fix(codegen): Use `body_codegen_attrs` For Caller In `adjust_target_feature_sig`)
 - #152871 (Fix warnings in rs{begin,end}.rs files)
 - #152879 (Remove `impl IntoQueryParam<P> for &'a P`.)
 - #152933 (Start migration for `LintDiagnostic` items by adding API and migrating `LinkerOutput` lint)
 - #152937 (remove unneeded reboxing)
 - #152953 (Fix typo in armv7a-vex-v5.md)
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Feb 22, 2026

⌛ Testing commit 168f324 with merge e59a71a...

Workflow: https://github.com/rust-lang/rust/actions/runs/22275041573

rust-bors bot pushed a commit that referenced this pull request Feb 22, 2026
… r=RalfJung

rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing

All PowerPC64 targets except AIX explicitly set the ABI in the target options. We can therefore stop hardcoding the ABI to be used based on the target environment or OS, except for the AIX special case.

The fallback based on endianness is kept for the sake of compatibility with custom targets.

This makes it so that big endian targets not explicitly accounted for before (powerpc64-unknown-openbsd) and targets that don't use the expected default ABI (big-endian ELFv2 Glibc targets) use the correct ABI in the calling convention code.

The second commit is a tiny change to validate the `llvm_abiname` set on PowerPC64(LE) targets. See the commit messages for details.

CC @RalfJung who pointed out the missing `llvm_abiname` validation
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 22, 2026
…ec-elf-abi, r=RalfJung

rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing

All PowerPC64 targets except AIX explicitly set the ABI in the target options. We can therefore stop hardcoding the ABI to be used based on the target environment or OS, except for the AIX special case.

The fallback based on endianness is kept for the sake of compatibility with custom targets.

This makes it so that big endian targets not explicitly accounted for before (powerpc64-unknown-openbsd) and targets that don't use the expected default ABI (big-endian ELFv2 Glibc targets) use the correct ABI in the calling convention code.

The second commit is a tiny change to validate the `llvm_abiname` set on PowerPC64(LE) targets. See the commit messages for details.

CC @RalfJung who pointed out the missing `llvm_abiname` validation
@JonathanBrouwer
Copy link
Copy Markdown
Contributor

once again

@bors yield

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Feb 22, 2026

Auto build cancelled. Cancelled workflows:

The next pull request likely to be tested is #152965.

rust-bors bot pushed a commit that referenced this pull request Feb 22, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - #150468 (rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing)
 - #151628 (Fix ICE in const eval of packed SIMD types with non-power-of-two element counts)
 - #151871 (don't use env with infer vars)
 - #152591 (Simplify internals of `{Rc,Arc}::default`)
 - #152865 (Fixed ByteStr not padding within its Display trait when no specific alignment is mentioned)
 - #147859 (reduce the amount of panics in `{TokenStream, Literal}::from_str` calls)
 - #152705 (Test(lib/win/proc): Skip `raw_attributes` doctest under Win7)
 - #152767 (fix typo in `carryless_mul` macro invocation)
 - #152837 (fix(codegen): Use `body_codegen_attrs` For Caller In `adjust_target_feature_sig`)
 - #152871 (Fix warnings in rs{begin,end}.rs files)
 - #152879 (Remove `impl IntoQueryParam<P> for &'a P`.)
 - #152933 (Start migration for `LintDiagnostic` items by adding API and migrating `LinkerOutput` lint)
 - #152937 (remove unneeded reboxing)
 - #152953 (Fix typo in armv7a-vex-v5.md)
rust-bors bot pushed a commit that referenced this pull request Feb 22, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - #150468 (rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing)
 - #151628 (Fix ICE in const eval of packed SIMD types with non-power-of-two element counts)
 - #151871 (don't use env with infer vars)
 - #152591 (Simplify internals of `{Rc,Arc}::default`)
 - #152865 (Fixed ByteStr not padding within its Display trait when no specific alignment is mentioned)
 - #147859 (reduce the amount of panics in `{TokenStream, Literal}::from_str` calls)
 - #152705 (Test(lib/win/proc): Skip `raw_attributes` doctest under Win7)
 - #152767 (fix typo in `carryless_mul` macro invocation)
 - #152837 (fix(codegen): Use `body_codegen_attrs` For Caller In `adjust_target_feature_sig`)
 - #152871 (Fix warnings in rs{begin,end}.rs files)
 - #152879 (Remove `impl IntoQueryParam<P> for &'a P`.)
 - #152933 (Start migration for `LintDiagnostic` items by adding API and migrating `LinkerOutput` lint)
 - #152937 (remove unneeded reboxing)
 - #152953 (Fix typo in armv7a-vex-v5.md)
@RalfJung RalfJung added the relnotes Marks issues that should be documented in the release notes of the next release. label Feb 22, 2026
@rust-bors rust-bors bot merged commit 7360a83 into rust-lang:main Feb 22, 2026
11 of 12 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Feb 22, 2026
rust-timer added a commit that referenced this pull request Feb 22, 2026
Rollup merge of #150468 - Gelbpunkt:rustc-target-callconv-spec-elf-abi, r=RalfJung

rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing

All PowerPC64 targets except AIX explicitly set the ABI in the target options. We can therefore stop hardcoding the ABI to be used based on the target environment or OS, except for the AIX special case.

The fallback based on endianness is kept for the sake of compatibility with custom targets.

This makes it so that big endian targets not explicitly accounted for before (powerpc64-unknown-openbsd) and targets that don't use the expected default ABI (big-endian ELFv2 Glibc targets) use the correct ABI in the calling convention code.

The second commit is a tiny change to validate the `llvm_abiname` set on PowerPC64(LE) targets. See the commit messages for details.

CC @RalfJung who pointed out the missing `llvm_abiname` validation
@Gelbpunkt
Copy link
Copy Markdown
Contributor Author

Also, @Gelbpunkt do you think this needs to be mentioned in the release notes?

I'm a bit late since you already added the label, sorry! It doesn't hurt to mention it, specifically since this should be a change in behavior for OpenBSD, even if it is a fix. Thanks for getting back to the PR!

github-actions bot pushed a commit to rust-lang/rust-analyzer that referenced this pull request Feb 23, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - rust-lang/rust#150468 (rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing)
 - rust-lang/rust#151628 (Fix ICE in const eval of packed SIMD types with non-power-of-two element counts)
 - rust-lang/rust#151871 (don't use env with infer vars)
 - rust-lang/rust#152591 (Simplify internals of `{Rc,Arc}::default`)
 - rust-lang/rust#152865 (Fixed ByteStr not padding within its Display trait when no specific alignment is mentioned)
 - rust-lang/rust#147859 (reduce the amount of panics in `{TokenStream, Literal}::from_str` calls)
 - rust-lang/rust#152705 (Test(lib/win/proc): Skip `raw_attributes` doctest under Win7)
 - rust-lang/rust#152767 (fix typo in `carryless_mul` macro invocation)
 - rust-lang/rust#152837 (fix(codegen): Use `body_codegen_attrs` For Caller In `adjust_target_feature_sig`)
 - rust-lang/rust#152871 (Fix warnings in rs{begin,end}.rs files)
 - rust-lang/rust#152879 (Remove `impl IntoQueryParam<P> for &'a P`.)
 - rust-lang/rust#152933 (Start migration for `LintDiagnostic` items by adding API and migrating `LinkerOutput` lint)
 - rust-lang/rust#152937 (remove unneeded reboxing)
 - rust-lang/rust#152953 (Fix typo in armv7a-vex-v5.md)
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Feb 23, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - rust-lang/rust#150468 (rustc_target: callconv: powerpc64: Use the ABI set in target options instead of guessing)
 - rust-lang/rust#151628 (Fix ICE in const eval of packed SIMD types with non-power-of-two element counts)
 - rust-lang/rust#151871 (don't use env with infer vars)
 - rust-lang/rust#152591 (Simplify internals of `{Rc,Arc}::default`)
 - rust-lang/rust#152865 (Fixed ByteStr not padding within its Display trait when no specific alignment is mentioned)
 - rust-lang/rust#147859 (reduce the amount of panics in `{TokenStream, Literal}::from_str` calls)
 - rust-lang/rust#152705 (Test(lib/win/proc): Skip `raw_attributes` doctest under Win7)
 - rust-lang/rust#152767 (fix typo in `carryless_mul` macro invocation)
 - rust-lang/rust#152837 (fix(codegen): Use `body_codegen_attrs` For Caller In `adjust_target_feature_sig`)
 - rust-lang/rust#152871 (Fix warnings in rs{begin,end}.rs files)
 - rust-lang/rust#152879 (Remove `impl IntoQueryParam<P> for &'a P`.)
 - rust-lang/rust#152933 (Start migration for `LintDiagnostic` items by adding API and migrating `LinkerOutput` lint)
 - rust-lang/rust#152937 (remove unneeded reboxing)
 - rust-lang/rust#152953 (Fix typo in armv7a-vex-v5.md)
Comment on lines +109 to +112
let abi = if cx.target_spec().options.abi == Abi::ElfV2 {
ELFv2
} else if cx.target_spec().options.abi == Abi::ElfV1 {
ELFv1
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I only just realized that this could also check llvm_abiname -- which is what actually gets sanity-checked in the target spec logic, and it is what actually tells LLVM what to do, so it's the more reliable source of truth.

Can you submit a PR to check llvm_abiname here instead?

JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 25, 2026
…ame, r=RalfJung

rustc_target: callconv: powerpc64: Use llvm_abiname rather than target_abi for ABI determination

Currently on PowerPC64 targets, `llvm_abiname` and `target_abi` will be the same unless we're on AIX. Since `llvm_abiname` is what we pass on to LLVM, it is preferable to use the value of that to determine the calling convention rather than `target_abi`.

All PowerPC64 targets set both `llvm_abiname` and `target_abi` to the respective ELF ABIs, with the exception of AIX. This is a non-functional change.

Noticed this in the follow-up discussion from rust-lang#150468 and also requested by @RalfJung [here](rust-lang#150468 (comment)).

r? @RalfJung
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 25, 2026
…ame, r=RalfJung

rustc_target: callconv: powerpc64: Use llvm_abiname rather than target_abi for ABI determination

Currently on PowerPC64 targets, `llvm_abiname` and `target_abi` will be the same unless we're on AIX. Since `llvm_abiname` is what we pass on to LLVM, it is preferable to use the value of that to determine the calling convention rather than `target_abi`.

All PowerPC64 targets set both `llvm_abiname` and `target_abi` to the respective ELF ABIs, with the exception of AIX. This is a non-functional change.

Noticed this in the follow-up discussion from rust-lang#150468 and also requested by @RalfJung [here](rust-lang#150468 (comment)).

r? @RalfJung
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 25, 2026
…ame, r=RalfJung

rustc_target: callconv: powerpc64: Use llvm_abiname rather than target_abi for ABI determination

Currently on PowerPC64 targets, `llvm_abiname` and `target_abi` will be the same unless we're on AIX. Since `llvm_abiname` is what we pass on to LLVM, it is preferable to use the value of that to determine the calling convention rather than `target_abi`.

All PowerPC64 targets set both `llvm_abiname` and `target_abi` to the respective ELF ABIs, with the exception of AIX. This is a non-functional change.

Noticed this in the follow-up discussion from rust-lang#150468 and also requested by @RalfJung [here](rust-lang#150468 (comment)).

r? @RalfJung
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 25, 2026
…ame, r=RalfJung

rustc_target: callconv: powerpc64: Use llvm_abiname rather than target_abi for ABI determination

Currently on PowerPC64 targets, `llvm_abiname` and `target_abi` will be the same unless we're on AIX. Since `llvm_abiname` is what we pass on to LLVM, it is preferable to use the value of that to determine the calling convention rather than `target_abi`.

All PowerPC64 targets set both `llvm_abiname` and `target_abi` to the respective ELF ABIs, with the exception of AIX. This is a non-functional change.

Noticed this in the follow-up discussion from rust-lang#150468 and also requested by @RalfJung [here](rust-lang#150468 (comment)).

r? @RalfJung
jhpratt added a commit to jhpratt/rust that referenced this pull request Feb 26, 2026
…ame, r=RalfJung

rustc_target: callconv: powerpc64: Use llvm_abiname rather than target_abi for ABI determination

Currently on PowerPC64 targets, `llvm_abiname` and `target_abi` will be the same unless we're on AIX. Since `llvm_abiname` is what we pass on to LLVM, it is preferable to use the value of that to determine the calling convention rather than `target_abi`.

All PowerPC64 targets set both `llvm_abiname` and `target_abi` to the respective ELF ABIs, with the exception of AIX. This is a non-functional change.

Noticed this in the follow-up discussion from rust-lang#150468 and also requested by @RalfJung [here](rust-lang#150468 (comment)).

r? @RalfJung
rust-timer added a commit that referenced this pull request Feb 26, 2026
Rollup merge of #153035 - Gelbpunkt:ppc64-callconv-llvm-abiname, r=RalfJung

rustc_target: callconv: powerpc64: Use llvm_abiname rather than target_abi for ABI determination

Currently on PowerPC64 targets, `llvm_abiname` and `target_abi` will be the same unless we're on AIX. Since `llvm_abiname` is what we pass on to LLVM, it is preferable to use the value of that to determine the calling convention rather than `target_abi`.

All PowerPC64 targets set both `llvm_abiname` and `target_abi` to the respective ELF ABIs, with the exception of AIX. This is a non-functional change.

Noticed this in the follow-up discussion from #150468 and also requested by @RalfJung [here](#150468 (comment)).

r? @RalfJung
github-actions bot pushed a commit to rust-lang/rust-analyzer that referenced this pull request Mar 2, 2026
…lfJung

rustc_target: callconv: powerpc64: Use llvm_abiname rather than target_abi for ABI determination

Currently on PowerPC64 targets, `llvm_abiname` and `target_abi` will be the same unless we're on AIX. Since `llvm_abiname` is what we pass on to LLVM, it is preferable to use the value of that to determine the calling convention rather than `target_abi`.

All PowerPC64 targets set both `llvm_abiname` and `target_abi` to the respective ELF ABIs, with the exception of AIX. This is a non-functional change.

Noticed this in the follow-up discussion from rust-lang/rust#150468 and also requested by @RalfJung [here](rust-lang/rust#150468 (comment)).

r? @RalfJung
wip-sync pushed a commit to NetBSD/pkgsrc-wip that referenced this pull request Apr 16, 2026
Pkgsrc changes:
 * Update version & checksums, and adapt to new libc crate included.

Upstream changes relative to 1.94.1:

Version 1.95 (2026-04-16)
==========================

Language
--------
- [Stabilize `if let` guards on match arms]
  (rust-lang/rust#141295)
- [`irrefutable_let_patterns` lint no longer lints on let chains]
  (rust-lang/rust#146832)
- [Support importing path-segment keywords with renaming]
  (rust-lang/rust#146972)
- [Stabilize inline assembly for PowerPC and PowerPC64]
  (rust-lang/rust#147996)
- [const-eval: be more consistent in the behavior of padding during
  typed copies] (rust-lang/rust#148967)
- [Const blocks are no longer evaluated to determine if expressions
  involving fallible operations can implicitly be constant-promoted.]
  (rust-lang/rust#150557). Expressions
  whose ability to implicitly be promoted would depend on the result
  of a const block are no longer implicitly promoted.
- [Make operational semantics of pattern matching independent of
  crate and module] (rust-lang/rust#150681)

Compiler
--------
- [Stabilize `--remap-path-scope` for controlling the scoping of
  how paths get remapped in the resulting binary]
  (rust-lang/rust#147611)

Platform Support
----------------
- [Promote `powerpc64-unknown-linux-musl` to Tier 2 with host tools]
  (rust-lang/rust#149962)
- [Promote `aarch64-apple-tvos` to Tier 2]
  (rust-lang/rust#152021)
- [Promote `aarch64-apple-tvos-sim` to Tier 2]
  (rust-lang/rust#152021)
- [Promote `aarch64-apple-watchos` to Tier 2]
  (rust-lang/rust#152021)
- [Promote `aarch64-apple-watchos-sim` to Tier 2]
  (rust-lang/rust#152021)
- [Promote `aarch64-apple-visionos` to Tier 2]
  (rust-lang/rust#152021)
- [Promote `aarch64-apple-visionos-sim` to Tier 2]
  (rust-lang/rust#152021)

Refer to Rust's [platform support page][platform-support-doc]
for more information on Rust's tiered platform support.

https://doc.rust-lang.org/rustc/platform-support.html

Libraries
---------
- [`thread::scope`: document how join interacts with TLS destructors]
  (rust-lang/rust#149482)
- [Speed up `str::contains` on aarch64 targets with `neon` target
  feature enabled by default]
  (rust-lang/rust#152176)

Stabilized APIs
---------------

- [`MaybeUninit<[T; N]>: From<[MaybeUninit<T>; N]>`]
  (https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#impl-From%3CMaybeUninit%3C%5BT;+N%5D%3E%3E-for-%5BMaybeUninit%3CT%3E;+N%5D)
- [`MaybeUninit<[T; N]>: AsRef<[MaybeUninit<T>; N]>`]
  (https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#impl-AsRef%3C%5BMaybeUninit%3CT%3E;+N%5D%3E-for-MaybeUninit%3C%5BT;+N%5D%3E)
- [`MaybeUninit<[T; N]>: AsRef<[MaybeUninit<T>]>`]
  (https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#impl-AsRef%3C%5BMaybeUninit%3CT%3E%5D%3E-for-MaybeUninit%3C%5BT;+N%5D%3E)
- [`MaybeUninit<[T; N]>: AsMut<[MaybeUninit<T>; N]>`]
  (https://doc.rust-lang.org/beta/std/mem/union.MaybeUninit.html#impl-AsMut%3C%5BMaybeUninit%3CT%3E;+N%5D%3E-for-MaybeUninit%3C%5BT;+N%5D%3E)
- [`MaybeUninit<[T; N]>: AsMut<[MaybeUninit<T>]>`]
  (https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#impl-AsMut%3C%5BMaybeUninit%3CT%3E%5D%3E-for-MaybeUninit%3C%5BT;+N%5D%3E)
- [`[MaybeUninit<T>; N]: From<MaybeUninit<[T; N]>>`]
  (https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#impl-From%3C%5BMaybeUninit%3CT%3E;+N%5D%3E-for-MaybeUninit%3C%5BT;+N%5D%3E)
- [`Cell<[T; N]>: AsRef<[Cell<T>; N]>`]
  (https://doc.rust-lang.org/stable/std/cell/struct.Cell.html#impl-AsRef%3C%5BCell%3CT%3E;+N%5D%3E-for-Cell%3C%5BT;+N%5D%3E)
- [`Cell<[T; N]>: AsRef<[Cell<T>]>`]
  (https://doc.rust-lang.org/stable/std/cell/struct.Cell.html#impl-AsRef%3C%5BCell%3CT%3E%5D%3E-for-Cell%3C%5BT;+N%5D%3E)
- [`Cell<[T]>: AsRef<[Cell<T>]>`]
  (https://doc.rust-lang.org/stable/std/cell/struct.Cell.html#impl-AsRef%3C%5BCell%3CT%3E%5D%3E-for-Cell%3C%5BT%5D%3E)
- [`bool: TryFrom<{integer}>`]
  (https://doc.rust-lang.org/stable/std/primitive.bool.html#impl-TryFrom%3Cu128%3E-for-bool)
- [`AtomicPtr::update`]
  (https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicPtr.html#method.update)
- [`AtomicPtr::try_update`]
  (https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicPtr.html#method.try_update)
- [`AtomicBool::update`]
  (https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicBool.html#method.update)
- [`AtomicBool::try_update`]
  (https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicBool.html#method.try_update)
- [`AtomicIn::update`]
  (https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicIsize.html#method.update)
- [`AtomicIn::try_update`]
  (https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicIsize.html#method.try_update)
- [`AtomicUn::update`]
  (https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicUsize.html#method.update)
- [`AtomicUn::try_update`]
  (https://doc.rust-lang.org/stable/std/sync/atomic/struct.AtomicUsize.html#method.try_update)
- [`cfg_select!`]
  (https://doc.rust-lang.org/stable/std/macro.cfg_select.html)
- [`mod core::range`]
  (https://doc.rust-lang.org/stable/core/range/index.html)
- [`core::range::RangeInclusive`]
  (https://doc.rust-lang.org/stable/core/range/struct.RangeInclusive.html)
- [`core::range::RangeInclusiveIter`]
  (https://doc.rust-lang.org/stable/core/range/struct.RangeInclusiveIter.html)
- [`core::hint::cold_path`]
  (https://doc.rust-lang.org/stable/core/hint/fn.cold_path.html)
- [`<*const T>::as_ref_unchecked`]
  (https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.as_ref_unchecked)
- [`<*mut T>::as_ref_unchecked`]
  (https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.as_ref_unchecked-1)
- [`<*mut T>::as_mut_unchecked`]
  (https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.as_mut_unchecked)

These previously stable APIs are now stable in const contexts:

- [`fmt::from_fn`]
  (https://doc.rust-lang.org/stable/std/fmt/fn.from_fn.html)
- [`ControlFlow::is_break`]
  (https://doc.rust-lang.org/stable/core/ops/enum.ControlFlow.html#method.is_break)
- [`ControlFlow::is_continue`]
  (https://doc.rust-lang.org/stable/core/ops/enum.ControlFlow.html#method.is_continue)

Cargo
-----
- [docs(report): enhance man pages for `cargo report *`]
  (rust-lang/cargo#16430)

Rustdoc
-----
- [In search results, rank unstable items lower]
  (rust-lang/rust#149460)
- [Add new "hide deprecated items" setting in rustdoc]
  (rust-lang/rust#151091)

Compatibility Notes
-------------------
- [Array coercions may now result in less inference constraints than before]
  (rust-lang/rust#140283)
- Importing `$crate` without renaming, i.e. `use $crate::{self};`,
  is now no longer permitted due to stricter error checking for `self`
  imports.
- [const-eval: be more consistent in the behavior of padding during
  typed copies.] (rust-lang/rust#148967)
  In very rare cases, this may cause compilation errors due to
  bytes from parts of a pointer ending up in the padding bytes of
  a `const` or `static`.
- [A future-incompatibility warning lint `ambiguous_glob_imported_traits`
  is now reported when using an ambiguously glob imported trait]
  (rust-lang/rust#149058)
- [Check lifetime bounds of types mentioning only type parameters]
  (rust-lang/rust#149389)
- [Report more visibility-related ambiguous import errors]
  (rust-lang/rust#149596)
- [Deprecate `Eq::assert_receiver_is_total_eq` and emit future
  compatibility warnings on manual impls]
  (rust-lang/rust#149978)
- [powerpc64: Use the ELF ABI version set in target spec instead
  of guessing] (rust-lang/rust#150468)
  (fixes the ELF ABI used by the OpenBSD target)
- Matching on a `#[non_exhaustive]` enum [now reads the discriminant,
  even if the enum has only one variant]
  (rust-lang/rust#150681). This can cause
  closures to capture values that they previously wouldn't.
- `mut ref` and `mut ref mut` patterns, part of the unstable [Match
  Ergonomics 2024 RFC] (rust-lang/rust#123076),
  were accidentally allowed on stable within struct pattern field
  shorthand. These patterns are now correctly feature-gated as
  unstable in this position.
- [Add future-compatibility warning for derive helper attributes
  which conflict with built-in attributes]
  (rust-lang/rust#151152)
- [JSON target specs]
  (https://doc.rust-lang.org/rustc/targets/custom.html) have been
  destabilized and now require `-Z unstable-options` to use.
  Previously, they could not be used without the standard library,
  which has no stable build mechanism. In preparation for the
  `build-std` project adding that support, JSON target specs are
  being proactively gated to ensure they remain unstable even if
  `build-std` is stabilized. Cargo now includes the `-Z json-target-spec`
  CLI flag to automatically pass `-Z unstable-options` to the
  compiler when needed. See [#150151]
  (rust-lang/rust#150151), [#151534]
  (rust-lang/rust#150151), and
  [rust-lang/cargo#16557] (rust-lang/cargo#16557).
- [The arguments of `#[feature]` attributes on invalid targets are
  now checked] (rust-lang/rust#153764)

Internal Changes
----------------

These changes do not affect any public interfaces of Rust, but they
represent significant improvements to the performance or internals
of rustc and related tools.

- [Update to LLVM 22](rust-lang/rust#150722)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.