Commit graph

316532 commits

Author SHA1 Message Date
reddevilmidzy
e0d9d470df Fix invalid mut T suggestion for &mut T in missing lifetime error
* Find ref prefix span for owned suggestions
* Improve missing lifetime suggestions for `&mut str`
2026-02-17 10:18:08 +00:00
bors
466ea4e6c3 Auto merge of #150722 - nikic:llvm-22, r=cuviper
Update to LLVM 22

Scheduled release date: Feb 24
1.94 becomes stable: Mar 5

Changes:
 * Update to rc2, with one patch to work around our outdated illumos sysroot (41256ab128).
 * Update the host toolchain as well, otherwise we lose cross-language LTO, in particular for jemalloc.
 * Adjust one loongarch assembly test. The split into r and s variants is based on the suggestion in https://github.com/rust-lang/rust/pull/151134.

Depends on:

 * [x] https://github.com/rust-lang/rust/pull/151410
 * [ ] https://github.com/rust-lang/rust/issues/150756
 * [x] https://github.com/llvm/llvm-project/issues/175190
 * [x] https://github.com/llvm/llvm-project/pull/175912
 * [x] https://github.com/llvm/llvm-project/issues/175965
 * [x] https://github.com/llvm/llvm-project/pull/176195
 * [x] https://github.com/llvm/llvm-project/issues/157073
 * [x] https://github.com/llvm/llvm-project/issues/176421
 * [x] https://github.com/llvm/llvm-project/pull/176925
 * [x] https://github.com/llvm/llvm-project/pull/177187
2026-01-28 08:01:21 +00:00
bors
e96bb7e44f Auto merge of #151749 - JonathanBrouwer:rollup-IRCTaVD, r=JonathanBrouwer
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#151161 (std: move time implementations to `sys`)
 - rust-lang/rust#151694 (more `proc_macro` bridge cleanups)
 - rust-lang/rust#151711 (stdarch subtree update)
 - rust-lang/rust#150557 (Don't try to evaluate const blocks during constant promotion)
2026-01-27 17:40:26 +00:00
Jonathan Brouwer
53fb684f84
Rollup merge of #150557 - dianne:no-const-block-eval-in-promotion, r=lcnr
Don't try to evaluate const blocks during constant promotion

As of https://github.com/rust-lang/rust/pull/138499, trying to evaluate a const block in anything depended on by borrow-checking will result in a query cycle. Since that could happen in constant promotion, this PR adds a check for const blocks there to stop them from being evaluated.

Admittedly, this is a hack. See https://github.com/rust-lang/rust/issues/124328 for discussion of a more principled fix: removing cases like this from constant promotion altogether. To simplify the conditions under which promotion can occur, we probably shouldn't be implicitly promoting division or array indexing at all if possible. That would likely require a FCW and migration period, so I figure we may as well patch up the cycle now and simplify later.

Fixes rust-lang/rust#150464

I'll also lang-nominate this for visibility. I'm not sure there's much to discuss about this PR specifically, but it does represent a change in semantics. In Rust 1.87, the code below compiled. In Rust 1.88, it became a query cycle error. After this PR, it fails to borrow-check because the temporaries can no longer be promoted.

```rust
let (x, y, z);
// We only promote array indexing if the index is known to be in-bounds.
x = &([0][const { 0 }] & 0);
// We only promote integer division if the divisor is known not to be zero.
y = &(1 / const { 1 });
// Furthermore, if the divisor is `-1`, we only promote if the dividend is
// known not to be `int::MIN`.
z = &(const { 1 } / -1);
// The borrowed temporaries can't be promoted, so they were dropped at the ends
// of their respective statements.
(x, y, z);
```
2026-01-27 17:00:54 +01:00
Jonathan Brouwer
7d11720fd3
Rollup merge of #151711 - folkertdev:stdarch-sync-2026-01-26, r=folkertdev
stdarch subtree update

Subtree update of `stdarch` to 9ba0a3f392.

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

r? @ghost
2026-01-27 17:00:54 +01:00
Jonathan Brouwer
84bb764741
Rollup merge of #151694 - cyrgani:more-pm-cleanup, r=petrochenkov
more `proc_macro` bridge cleanups

Some followups made possible by rust-lang/rust#151505.
2026-01-27 17:00:53 +01:00
Jonathan Brouwer
80102f389d
Rollup merge of #151161 - joboet:move-pal-time, r=tgross35
std: move time implementations to `sys`

This is probably the most complex step of rust-lang/rust#117276 so far. Unfortunately, quite some of the internal time logic defined in the PAL is also used in other places like the filesystem code, so this isn't just a series of simple moves. I've left all that logic inside the PAL and only moved the actual `SystemTime`/`Instant` implementations.

While there are no functional changes, this PR also contains some slight code cleanups on Windows and Hermit, these are explained in the relevant commits.

For additional details see the individual commits, I've tried to make the messages as helpful as possible about what's going on.
2026-01-27 17:00:52 +01:00
dianne
4039cef09e Don't evaluate const blocks in constant promotion 2026-01-27 04:31:57 -08:00
Nikita Popov
e015fc820d Adjust loongarch assembly test
This generates different code on loongarch32r now.
2026-01-27 12:09:39 +01:00
Nikita Popov
749a27975c Update host toolchain 2026-01-27 12:09:39 +01:00
Nikita Popov
3510a9ad0c Update to LLVM 22 2026-01-27 12:09:39 +01:00
bors
94a0cd15f5 Auto merge of #151683 - Zalathar:compiler-kind, r=jieyouxu
compiletest: Add `CompilerKind` to distinguish between rustc and rustdoc

This PR slightly improves `TestCx::make_compile_args` by using `CompilerKind` to explicitly distinguish between rustc and rustdoc.

The resulting code could still use more attention, but I think this is a good incremental improvement.

There *should* (hopefully) be no change to overall compiletest behaviour.
2026-01-27 10:12:01 +00:00
joboet
5a98a51987
hardcode some Windows constants in miri
The `std` paths are subject to change, but the values themselves will never
change.
2026-01-27 10:52:25 +01:00
joboet
fe51f9debc
std: move time implementations to sys (Hermit)
Last on the list: Hermit. Since I anticipate that Hermit will share the UNIX
implementation in the future, I've left `Timespec` in the PAL to maintain a
similar structure. Also, I noticed that some public `Instant` methods were
redefined on the internal `Instant`. But the networking code can just use the
public `Instant`, so I've removed them.
2026-01-27 10:52:25 +01:00
joboet
eec058eacc
std: move time implementations to sys (WASI/TEEOS)
WASI and TEEOS share the UNIX implementation. Since `Timespec` lives in the
PAL, this means that the `#[path]` imports of `unix/time.rs` still remain for
these two, unfortunately. Maybe we'll solve that in the future by always
including the UNIX PAL for these remotely UNIXy platforms. But that's a story
for another time...
2026-01-27 10:52:25 +01:00
joboet
05bbfa2593
std: move time implementations to sys (UNIX)
Now for UNIX: `Timespec` is also used for things like futex or `Condvar`
timeouts, so it stays in the PAL along with some related definitions.
Everything else is `SystemTime`- and `Instant`-specific, and is thus moved to
`sys::time`.
2026-01-27 10:52:25 +01:00
joboet
6cb343bfb2
std: move time implementations to sys (Windows)
Windows has a similar problem as UEFI: some internals are also used for
implementing other things. Thus I've left everything except for the actual
`Instant` and `SystemTime` implementations inside the PAL.

I've also taken the liberty of improving the code clarity a bit: there were a
number of manual `SystemTime` conversions (including one that masked an `i64`
to 32-bits before casting to `u32`, yikes) that now just call `from_intervals`.
Also, defining a `PerformanceCounterInstant` just to convert it to a regular
`Instant` immediately doesn't really make sense to me. I've thus changed the
`perf_counter` module to contain only free functions that wrap system
functionality. The actual conversion now happens in `Instant::now`.
2026-01-27 10:28:06 +01:00
joboet
963f6029ce
std: move time implementations to sys (UEFI)
Next up: UEFI. Unfortunately the time conversion internals are also required by
the filesystem code, so I've left them in the PAL. The `Instant` internals
however are only used for the `Instant` implementation, so I've moved them to
`sys` (for now).
2026-01-27 10:27:59 +01:00
joboet
bd754c7119
std: move time implementations to sys (Solid)
On SOLID, the conversion functions are also used to implement helpers for
timeout conversion, so these stay in the PAL. The `Instant` (µITRON) and
`SystemTime` (SOLID-specific) implementations are merged into one. While it was
nice to have the µITRON parts in a separate module, there really isn't a need
for this currently, as there is no other µITRON target. Let's not worry about
this until such a target gets added...

Note that I've extracted the `get_tim` call from `Instant` into a wrapper
function in the PAL to avoid the need to make the inner `Instant` field public
for use in the PAL.
2026-01-27 10:27:43 +01:00
joboet
5978e19456
std: move time implementations to sys (VEX)
Now that the `unsupported` module exists, we can use it for VEX. VEX actually
supports `Instant` though, so the implementation-select needs to combine that
with the `unsupported` module.
2026-01-27 10:27:30 +01:00
joboet
29b16c0a55
std: move time implementations to sys (small platforms)
Let's start with the easy ones:
* Motor just reexports its platform library
* The SGX code is just a trivial move
* Trusty, WASM and ZKVM are unsupported, this is very trivial. And we can get
  rid of some `#[path = ...]`s, yay!
2026-01-27 10:26:54 +01:00
joboet
814d902c50
std: move time implementations to sys (preparation) 2026-01-27 10:26:45 +01:00
bors
78df2f92de Auto merge of #151727 - Zalathar:rollup-goIJldt, r=Zalathar
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#151692 (Try to reduce rustdoc GUI tests flakyness)
 - rust-lang/rust#147436 (slice/ascii: Optimize `eq_ignore_ascii_case` with auto-vectorization)
 - rust-lang/rust#151390 (Reintroduce `QueryStackFrame` split.)
 - rust-lang/rust#151097 (Use an associated type default for `Key::Cache`.)
 - rust-lang/rust#151702 (Omit standard copyright notice)
2026-01-27 06:37:15 +00:00
Stuart Cook
6ec16a4099
Rollup merge of #151702 - xtqqczze:omit-copyright-notice, r=jieyouxu
Omit standard copyright notice

Remove copyright notices for files licensed under the standard terms (MIT OR Apache-2.0).
2026-01-27 17:36:37 +11:00
Stuart Cook
3b89fc65a9
Rollup merge of #151097 - nnethercote:associated_type_defaults-query-key, r=Noratrieb
Use an associated type default for `Key::Cache`.

They currently aren't used because r-a didn't support them, but r-a support was recently merged in
https://github.com/rust-lang/rust-analyzer/pull/21243.

r? @Noratrieb
2026-01-27 17:36:36 +11:00
Stuart Cook
9108101955
Rollup merge of #151390 - nnethercote:revert, r=petrochenkov
Reintroduce `QueryStackFrame` split.

I tried removing it in rust-lang/rust#151203, to replace it with something simpler. But a couple of fuzzing failures have come up and I don't have a clear picture on how to fix them. So I'm reverting the main part of rust-lang/rust#151203.

This commit also adds the two fuzzing tests.

Fixes rust-lang/rust#151226, rust-lang/rust#151358.

r? @oli-obk
2026-01-27 17:36:36 +11:00
Stuart Cook
1c892e829c
Rollup merge of #147436 - okaneco:eq_ignore_ascii_autovec, r=scottmcm
slice/ascii: Optimize `eq_ignore_ascii_case` with auto-vectorization

- Refactor the current functionality into a helper function
- Use `as_chunks` to encourage auto-vectorization in the optimized chunk processing function
- Add a codegen test checking for vectorization and no panicking
- Add benches for `eq_ignore_ascii_case`

---

The optimized function is initially only enabled for x86_64 which has `sse2` as part of its baseline, but none of the code is platform specific. Other platforms with SIMD instructions may also benefit from this implementation.

Performance improvements only manifest for slices of 16 bytes or longer, so the optimized path is gated behind a length check for greater than or equal to 16.

Benchmarks - Cases below 16 bytes are unaffected, cases above all show sizeable improvements.
```
before:
    str::eq_ignore_ascii_case::bench_large_str_eq         4942.30ns/iter +/- 48.20
    str::eq_ignore_ascii_case::bench_medium_str_eq         632.01ns/iter +/- 16.87
    str::eq_ignore_ascii_case::bench_str_17_bytes_eq        16.28ns/iter  +/- 0.45
    str::eq_ignore_ascii_case::bench_str_31_bytes_eq        35.23ns/iter  +/- 2.28
    str::eq_ignore_ascii_case::bench_str_of_8_bytes_eq       7.56ns/iter  +/- 0.22
    str::eq_ignore_ascii_case::bench_str_under_8_bytes_eq    2.64ns/iter  +/- 0.06
after:
    str::eq_ignore_ascii_case::bench_large_str_eq         611.63ns/iter +/- 28.29
    str::eq_ignore_ascii_case::bench_medium_str_eq         77.10ns/iter +/- 19.76
    str::eq_ignore_ascii_case::bench_str_17_bytes_eq        3.49ns/iter  +/- 0.39
    str::eq_ignore_ascii_case::bench_str_31_bytes_eq        3.50ns/iter  +/- 0.27
    str::eq_ignore_ascii_case::bench_str_of_8_bytes_eq      7.27ns/iter  +/- 0.09
    str::eq_ignore_ascii_case::bench_str_under_8_bytes_eq   2.60ns/iter  +/- 0.05
```
2026-01-27 17:36:35 +11:00
Stuart Cook
8ae4aca9ac
Rollup merge of #151692 - GuillaumeGomez:reduce-flaky, r=jieyouxu
Try to reduce rustdoc GUI tests flakyness

Should help with https://github.com/rust-lang/rust/issues/93784.

I replaced a use of `puppeteer.wait` function with a loop instead (like the rest of `browser-ui-test`).

r? @jieyouxu
2026-01-27 17:36:34 +11:00
Zalathar
40d4d322b8 Rename rustc command variable to compiler 2026-01-27 16:26:06 +11:00
Zalathar
0b42f38dc7 Replace is_rustdoc with clearer compiler-kind checks 2026-01-27 16:26:06 +11:00
Zalathar
5e629be648 Add CompilerKind to distinguish between rustc and rustdoc 2026-01-27 16:26:06 +11:00
Nicholas Nethercote
aebcf78527 Remove unused Key/AsLocalKey impls. 2026-01-27 14:37:40 +11:00
Nicholas Nethercote
120247a76f Use an associated type default for Key::Cache.
They currently aren't used because r-a didn't support them, but r-a
support was recently merged in
https://github.com/rust-lang/rust-analyzer/pull/21243.
2026-01-27 14:37:39 +11:00
bors
ebf13cca58 Auto merge of #151716 - Zalathar:rollup-kd2N5CM, r=Zalathar
Rollup of 12 pull requests

Successful merges:

 - rust-lang/rust#147996 (Stabilize ppc inline assembly)
 - rust-lang/rust#148718 (Do not mention `-Zmacro-backtrace` for std macros that are a wrapper around a compiler intrinsic)
 - rust-lang/rust#151137 (checksum-freshness: Fix invalid checksum calculation for binary files)
 - rust-lang/rust#151680 (Update backtrace and windows-bindgen)
 - rust-lang/rust#150863 (Adds two new Tier 3 targets - `aarch64v8r-unknown-none{,-softfloat}`)
 - rust-lang/rust#151040 (Don't expose redundant information in `rustc_public`'s `LayoutShape`)
 - rust-lang/rust#151383 (remove `#[deprecated]` from unstable & internal `SipHasher13` and `24` types)
 - rust-lang/rust#151529 (lint: Use rustc_apfloat for `overflowing_literals`, add f16 and f128)
 - rust-lang/rust#151669 (rename uN::{gather,scatter}_bits to uN::{extract,deposit}_bits)
 - rust-lang/rust#151689 (Fix broken Xtensa installation link)
 - rust-lang/rust#151699 (Update books)
 - rust-lang/rust#151700 (os allow missing_docs)
2026-01-27 01:51:41 +00:00
Stuart Cook
2f8f4acbd6
Rollup merge of #151700 - lblasc:os-allow-missing-docs, r=tgross35
os allow missing_docs

Resolves rustc build faliure.

Discovered in https://github.com/NixOS/nixpkgs/pull/470993

```
rustc>  Documenting core v0.0.0 (/nix/var/nix/builds/nix-78118-1377149852/rustc-1.92.0-src/library/core)
rustc> error: missing documentation for a module
rustc>   --> library/core/src/os/mod.rs:13:1
rustc>    |
rustc> 13 | pub mod darwin {}
rustc>    | ^^^^^^^^^^^^^^
rustc>    |
rustc>    = note: `-D missing-docs` implied by `-D warnings`
rustc>    = help: to override `-D warnings` add `#[allow(missing_docs)]`
rustc>
rustc>     Checking compiler_builtins v0.1.160 (/nix/var/nix/builds/nix-78118-1377149852/rustc-1.92.0-src/library/compiler-builtins/compiler-builtins)
rustc> error: could not document `core`
rustc> warning: build failed, waiting for other jobs to finish...
rustc> Command `/nix/store/h499wcc6pl9whxa2kznjm76wy4f3lcm0-cargo-bootstrap-1.92.0/bin/cargo doc --target wasm32-unknown-unknown -Zbinary-dep-depinfo -j 10 -Zroot-dir=/nix/var/nix/builds/nix-78118-1377149852/rustc-1.92.0-src --frozen --release -p alloc -p compiler_builtins -p core -p panic_abort -p panic_unwind -p proc_macro -p rustc-std-workspace-core -p std -p std_detect -p sysroot -p test -p unwind --features 'backtrace panic-unwind' --manifest-path /nix/var/nix/builds/nix-78118-1377149852/rustc-1.92.0-src/library/sysroot/Cargo.toml --no-deps --target-dir /nix/var/nix/builds/nix-78118-1377149852/rustc-1.92.0-src/build/aarch64-apple-darwin/stage1-std/wasm32-unknown-unknown/doc -Zskip-rustdoc-fingerprint -Zrustdoc-map [workdir=/nix/var/nix/builds/nix-78118-1377149852/rustc-1.92.0-src]` failed with exit code 101
rustc> Created at: src/bootstrap/src/core/build_steps/doc.rs:781:21
rustc> Executed at: src/bootstrap/src/core/build_steps/doc.rs:814:22
rustc>
rustc> Command has failed. Rerun with -v to see more details.
```
2026-01-27 12:50:54 +11:00
Stuart Cook
4e4b5bf6f5
Rollup merge of #151699 - rustbot:docs-update, r=ehuss
Update books

## rust-lang/reference

5 commits in 28b5a54419985f03db5294de5eede71b6665b594..990819b86c22bbf538c0526f0287670f3dc1a67a
2026-01-20 20:46:59 UTC to 2026-01-14 01:48:22 UTC

- Rename the ".general" rules (rust-lang/reference#2133)
- Unwrap more chapters (rust-lang/reference#2134)
- Add missing semicolon to ambiguity.glob-vs-glob (rust-lang/reference#2132)
- Fix spacing with ordered lists (rust-lang/reference#2131)
- Reflect explicit macro import in reference (rust-lang/reference#2077)

## rust-lang/rust-by-example

6 commits in 8de6ff811315ac3a96ebe01d74057382e42ffdee..bac931ef1673af63fb60c3d691633034713cca20
2026-01-25 21:02:15 UTC to 2026-01-14 19:45:27 UTC

- Update supertraits.md (rust-lang/rust-by-example#1988)
- Update question_mark.md (rust-lang/rust-by-example#1990)
- Update deprecated functions in `Box::leak` example (rust-lang/rust-by-example#1992)
- Improve Clone and Copy traits documentation (rust-lang/rust-by-example#1993)
- Fix typo (rust-lang/rust-by-example#1986)
- Korean translation! (rust-lang/rust-by-example#1985)
2026-01-27 12:50:54 +11:00
Stuart Cook
6b6584fdc0
Rollup merge of #151689 - zzaekkii:xtensa-installation, r=jieyouxu
Fix broken Xtensa installation link

### Location (URL)
https://doc.rust-lang.org/rustc/platform-support/xtensa.html

<img width="800" alt="image" src="https://github.com/user-attachments/assets/dbf1fea5-e65f-4bb2-beea-bf3267b12aff" />

### Summary
The Xtensa platform documentation currently links to an outdated Rust on ESP Book installation page that no longer exists.

The Rust on ESP Book has been reorganized, and the installation instructions previously referenced under `/book/installation/` are now located under the Getting Started section.

The link is updated to reference the current Toolchain Installation page, which contains the up-to-date instructions for building Xtensa targets.
2026-01-27 12:50:53 +11:00
Stuart Cook
bf01ad8916
Rollup merge of #151669 - quaternic:rename-gather-scatter-bits, r=scottmcm
rename uN::{gather,scatter}_bits to uN::{extract,deposit}_bits

Feature gate: `#![feature(uint_gather_scatter_bits)]`
Tracking issue: https://github.com/rust-lang/rust/issues/149069

Rename the methods as requested in https://github.com/rust-lang/rust/issues/149069#issuecomment-3633691777
 -  `gather_bits` -> `extract_bits`
 -  `scatter_bits` -> `deposit_bits`
2026-01-27 12:50:53 +11:00
Stuart Cook
af523529be
Rollup merge of #151529 - tgross35:lint-apfloat, r=nnethercote
lint: Use rustc_apfloat for `overflowing_literals`, add f16 and f128

Switch to parsing float literals for overflow checks using `rustc_apfloat` rather than host floats. This avoids small variations in platform support and makes it possible to start checking `f16` and `f128` as well.

Using APFloat matches what we try to do elsewhere to avoid platform inconsistencies.
2026-01-27 12:50:52 +11:00
Stuart Cook
956ebbde20
Rollup merge of #151383 - cyrgani:no-internal-deprecation, r=scottmcm
remove `#[deprecated]` from unstable & internal `SipHasher13` and `24` types

These types are unstable and `doc(hidden)` (under the internal feature `hashmap_internals`). Deprecating them only adds noise (`#[allow(deprecated)]`) to all places where they are used, so this PR removes the deprecation attributes from them.

It also includes a few other small cleanups in separate commits, including one I overlooked in rust-lang/rust#151228.
2026-01-27 12:50:52 +11:00
Stuart Cook
957801bf74
Rollup merge of #151040 - moulins:public-variant-layout, r=makai410
Don't expose redundant information in `rustc_public`'s `LayoutShape`

Enum variant layouts don't need to store a full `LayoutShape`; just storing the fields offsets is enough and all other information can be inferred from the parent layout:
- size, align and ABI don't make much sense for individual variants and should generally be taken from the parent layout instead;
- variants always have `fields: FieldsShape::Arbitrary { .. }` and `variant: VariantShape::Single { .. }`.

In principle, the same refactor could be done on `rustc_abi::Layout` (see [this comment](https://github.com/rust-lang/rust/issues/113988#issuecomment-1646982272)) but I prefer starting with this smaller change first.
2026-01-27 12:50:52 +11:00
Stuart Cook
db654cb421
Rollup merge of #150863 - ferrocene:add-aarch64v8r-targets, r=wesleywiser
Adds two new Tier 3 targets - `aarch64v8r-unknown-none{,-softfloat}`

## New Tier 3 targets - `aarch64v8r-unknown-none` and `aarch64v8r-unknown-none-softfloat`

This PR adds two new Tier 3 targets - `aarch64v8r-unknown-none` and `aarch64v8r-unknown-none-softfloat`.

The existing `aarch64-unknown-none` target assumes Armv8.0-A as a baseline. However, Arm recently released the Arm Cortex-R82 processor which is the first to implement the Armv8-R AArch64 mode architecture. This architecture is similar to Armv8-A AArch64, however it has a different set of mandatory features, and is based off of Armv8.4. It is largely unrelated to the existing Armv8-R architecture target (`armv8r-none-eabihf`), which only operates in AArch32 mode.

The second `aarch64v8r-unknown-none-softfloat` target allows for possible Armv8-R AArch64 CPUs with no FPU, or for use-cases where FPU register stacking is not desired. As with the existing `aarch64-unknown-none` target we have coupled FPU support and Neon support together - there is no 'has FPU but does not have NEON' target proposed even though the architecture technically allows for it.

These targets are in support of firmware development on upcoming systems using the Arm Cortex-R82, particularly safety-critical firmware development. For now, it can be tested using the Arm's Armv8-R AArch64 Fixed Virtual Platform emulator, which we have used to test this target. We are also in the process of testing this target with the full compiler test suite as part of Ferrocene, in the same way we test `aarch64-unknown-none` to a safety-qualified standard. We have not identified any issues as yet, but if we do, we will send the fixes upstream to you.

## Ownership

This PR was developed by Ferrous Systems on behalf of Arm. Arm is the owner of these changes.

## Tier 3 Policy Notes

To cover off the Tier 3 requirements:

> A tier 3 target must have a designated developer or developers

Arm will maintain this target, and I have presumed the Embedded Devices Working Group will also take an interest, as they maintain the existing Arm bare-metal targets.

> Targets must use naming consistent with any existing targets

We prefix this target with `aarch64` because it generates A64 machine code (like `arm*` generates A32 and `thumb*` generates T32). In an ideal world I'd get to rename the existing target `aarch64v8a-unknown-none` but that's basically impossible at this point. You can assume `v6` for any `arm*` target where unspecified, and you can assume `v8a` for any `aarch64*` target where not specified.

> Tier 3 targets may have unusual requirements to build or use, but must not create legal issues or impose onerous legal terms for the Rust project or for Rust developers or users.

It works just like the existing AArch64 bare-metal target.

> Neither this policy nor any decisions made regarding targets shall create any binding agreement or estoppel by any party. If any member of an approving Rust team serves as one of the maintainers of a target, or has any legal or employment requirement (explicit or implicit) that might affect their decisions regarding a target, they must recuse themselves from any approval decisions regarding the target's tier status, though they may otherwise participate in discussions.

Noted.

> Tier 3 targets should attempt to implement as much of the standard libraries as possible and appropriate.

It's a bare-metal target, offering libcore and liballoc.

> The target must provide documentation for the Rust community explaining how to build for the target, using cross-compilation if possible.

Done

> Tier 3 targets must not impose burden on the authors of pull requests, or other developers in the community, to maintain the target.

AArch64 is a Tier 1 architecture, so I don't expect this target to cause any issues.

> Patches adding or updating tier 3 targets must not break any existing tier 2 or tier 1 target, and must not knowingly break another tier 3 target without approval of either the compiler team or the maintainers of the other tier 3 target.

Noted.

> Tier 3 targets must be able to produce assembly using at least one of rustc's supported backends from any host target.

It's AArch64 and so works with LLVM.
2026-01-27 12:50:51 +11:00
Stuart Cook
92e8bf864b
Rollup merge of #151680 - ChrisDenton:bindgen, r=tgross35
Update backtrace and windows-bindgen

Supersedes the backtrace bump in rust-lang/rust#151659

This is mostly just renaming `windows_targets` to `windows_link` but it needs to be done in tandem with the backtrace submodule update. The reason for doing this is that backtrace is both copy/pasted into std (via being a submodule) and published as an independent crate.
2026-01-27 12:50:51 +11:00
Stuart Cook
933e686e91
Rollup merge of #151137 - osiewicz:151090-checksum-freshness-binary-files, r=jdonszelmann
checksum-freshness: Fix invalid checksum calculation for binary files

Admittedly this is not the cleanest way to achieve this, but SourceMap is quite intertwined with source files being represented as Strings.
Tracking issue: https://github.com/rust-lang/cargo/issues/14136
Closes: rust-lang/rust#151090
2026-01-27 12:50:50 +11:00
Stuart Cook
b4f8dc726f
Rollup merge of #148718 - estebank:macro-spans, r=nnethercote
Do not mention `-Zmacro-backtrace` for std macros that are a wrapper around a compiler intrinsic
2026-01-27 12:50:50 +11:00
Stuart Cook
586f7aa02b
Rollup merge of #147996 - pmur:murp/stabilize-ppc-inlineasm, r=Amanieu
Stabilize ppc inline assembly

This stabilizes inline assembly for PowerPC and PowerPC64.

Corresponding reference PR: rust-lang/reference#2056

---

From the requirements of stabilization mentioned in https://github.com/rust-lang/rust/issues/93335

> Each architecture needs to be reviewed before stabilization:

> * It must have clobber_abi.

Done in https://github.com/rust-lang/rust/pull/146949.

> * It must be possible to clobber every register that is normally clobbered by a function call.

Done in https://github.com/rust-lang/rust/pull/131341

Similarly, `preserves_flags` is also implemented by this PR. Likewise, there is a non-code change to `preserve_flags` expectations that floating point and vector status and sticky bits are preserved. The reference manual update has more details.

 > * Generally review that the exposed register classes make sense.

The followings can be used as input/output:
* reg (`r0`, `r[3-12]`, `r[14-r28]`): Any usable general-purpose register
* reg_nonzero (`r[3-12]`, `r[14-r28]`): General-purpose registers, but excludes `r0`. This is needed for instructions which define `r0` to be the value 0, such as register + immediate memory operations.
* reg/reg_nonzero `r29` on PowerPC64 targets.
* freg (`f[0-31]`): 64 bit floating pointer registers

The following are clobber-only:

* `ctr`, `lr`, `xer`: commonly clobbered special-purpose registers used in inline asm
* `cr` (`cr[0-7]`, `cr`): the condition register fields, or the entire condition register.
* `vreg` (`v[0-31]`): altivec/vmx register
* `vsreg` (`vs[0-63]`): vector-scalar register
* `spe_acc`: SPE accumulator, only available for PowerPC SPE targets.

The vreg and vsreg registers technically accept `#[repr(simd)]` types, but require the experimental `altivec` or `vsx` target features to be enabled. That work seems to be tracked here, rust-lang/rust#42743.

The following cannot be used as operands for inline asm:

* `r2`: the TOC pointer, required for most PIC code.
* `r13`: the TLS pointer
* `r[29]`: Reserved for internal usage by LLVM on PowerPC
* `r[30]`: Reserved for internal usage by LLVM on PowerPC and PowerPC64
* `r31`: the frame pointer
* `vrsave`: this is effectively an unused special-purpose register.

The `preserves_flags` behavior is updated with the following behavior (Note, this is not enforceable today due to LLVM restrictions):
* All status and sticky bits of `fpscr`, `spefscr`, and `vscr` are preserved.

The following registers are unavailable:
* `mma[0-7]`: These are new "registers" available on Power10, they are 512b registers which overlay 4x vsx registers. If needed, users can mark such clobbers as vsN*4, vsN*4+1,...,vsN*4+3.
* `ap`: This is actually a pseudo-register in gcc/llvm.
* `mq`: This register is only available on Power1 and Power2, and is not supported by llvm.

---
cc @taiki-e
r? @Amanieu
@rustbot label +A-inline-assembly
2026-01-27 12:50:49 +11:00
Trevor Gross
9b15010686 lint: Use rustc_apfloat for overflowing_literals, add f16 and f128
Switch to parsing float literals for overflow checks using
`rustc_apfloat` rather than host floats. This avoids small variations in
platform support and makes it possible to start checking `f16` and
`f128` as well.

Using APFloat matches what we try to do elsewhere to avoid platform
inconsistencies.
2026-01-26 18:25:42 -06:00
Nicholas Nethercote
0385e26e7d Reintroduce QueryStackFrame split.
I tried removing it in #151203, to replace it with something simpler.
But a couple of fuzzing failures have come up and I don't have a clear
picture on how to fix them. So I'm reverting the main part of #151203.

This commit also adds the two fuzzing tests.

Fixes #151226, #151358.
2026-01-27 09:42:38 +11:00
Folkert de Vries
fdad66a382
enable target_feature_inline_always in core and std
this is required for compiling `stdarch`
2026-01-26 23:17:31 +01:00
Folkert de Vries
f648ba2e0a
Merge pull request #2003 from folkertdev/use-simd-splat
use `simd_splat`
2026-01-26 21:01:13 +00:00