Skip to content

Conversation

@workflows-rustc-dev-guide
Copy link

Latest update from rustc.

Enselic and others added 29 commits January 19, 2026 20:43
Only run finalizers of accepted attributes

Locally this had insanely good perf, but lets see what reality thinks about this
r? @jdonszelmann 

Attribute parsing consists of two stages:

- All attribute are "accepted" by one or more parsers, which means the unparsed attribute is parsed, information about it is stored in the attr parser struct
- After all attributes are parsed, we "finalize" all parsers, producing a single parsed attribute representation from the parser struct.

This two-stage process exist so multiple attributes can get merged into one parser representation. For example if you have two repr attributes `#[repr(C)]` `#[repr(packed)]` it will only produce one parsed `Repr` attribue.

The dumb thing we did was we would "finalize" all parsers, even the ones that never accepted an attribute. This PR only calls finalize on the parsers that accepted at least one attribute.
fix(build-manifest)!: limit `rustc-docs` to current host target in the manifest
…, r=Kobzol

Move bootstrap configuration to library workspace

This creates a new "dist" profile in the standard library which contains configuration for the distributed std artifacts previously contained in bootstrap, in order for a future build-std implementation to use. bootstrap.toml settings continue to override these defaults, as would any RUSTFLAGS provided. I've left some cargo features driven by bootstrap for a future patch.

Unfortunately, profiles aren't expressive enough to express per-target overrides, so [this risc-v example](https://github.com/rust-lang/rust/blob/c8f22ca269a1f2653ac962fe2bc21105065fd6cd/src/bootstrap/src/core/build_steps/compile.rs#L692) was not able to be moved across. This could go in its own profile which Cargo would have to know to use, and then the panic-abort rustflags overrides would need duplicating again. Doesn't seem like a sustainable solution as a couple similar overrides would explode the number of lines here.

We could use a cargo config in the library workspace for this, but this then would have to be respected by Cargo's build-std implementation and I'm not yet sure about the tradeoffs there.

This patch also introduces a build probe to deal with the test crate's stability which is obviously not ideal, I'm open to other solutions here or can back that change out for now if anyone prefers.

cc @Mark-Simulacrum rust-lang/rfcs#3874
Remove suggestion from importing unstable items on stable channel

Fixes rust-lang/rust#149402
diagnostics: suggest deriving Default for enums

Fixing outdated code: now we can derive Default for enums

r? @lcnr
…ve, r=tshepang

Fix typo: 'recieve' -> 'receive' in lldb-visualizers.md
…uwer

Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#151412 (diagnostics: suggest deriving Default for enums)
 - rust-lang/rust#151495 (Fix ICE when using zero-length SIMD type in extern static)
 - rust-lang/rust#151497 (Fix typo: 'recieve' -> 'receive' in lldb-visualizers.md)

r? @ghost
Use `repeat_packed` when calculating layouts in `RawVec`

Seeing whether this helps the icounts seen in rust-lang/rust#148769 (comment)
Clippy subtree update

r? Manishearth 

`Cargo.lock` update due to Clippy version bump.
Use allocator_shim_contents in allocator_shim_symbols
Update cargo submodule

14 commits in 85eff7c80277b57f78b11e28d14154ab12fcf643..efcd9f58636c1990393d495159045d9c35e43b8f
2026-01-15 16:18:08 +0000 to 2026-01-23 13:50:59 +0000
- chore(deps): update cargo-semver-checks to v0.46.0 (rust-lang/cargo#16548)
- Increase cache_lock test timeout (rust-lang/cargo#16545)
- iTerm now supports OSC 9;4 (terminal window progress bar) (rust-lang/cargo#16506)
- chore: Updated compiler errors for Rust 1.93 (rust-lang/cargo#16543)
- test(build-std): adjust snapshot (rust-lang/cargo#16539)
- chore: bump to 0.96.0 (rust-lang/cargo#16538)
- fix: update `resolve_all_features()` to filter pkg deps (rust-lang/cargo#16221)
- fix: show implicit_minimum_version_req emitted source once per package (rust-lang/cargo#16535)
- fix: `--remap-path-scope` stabilized in 1.95-nightly (rust-lang/cargo#16536)
- feat(lints): Add non_kebab_case_bin lint  (rust-lang/cargo#16524)
- fix(rm): Suggest table flags when none are specified (rust-lang/cargo#16533)
- fix(patch): clean up patch-related error messages (rust-lang/cargo#16498)
- Store artifact deps in build unit dir (rust-lang/cargo#16519)
- refactor(timings): reuse timing metric collection logic between `--timings` and `-Zbuild-analysis` (rust-lang/cargo#16497)
…ulacrum

Promote powerpc64-unknown-linux-musl to tier 2 with host tools

MCP: rust-lang/compiler-team#946

Tested by compiling on an x86_64 host via `DEPLOY=1 ./src/ci/docker/run.sh dist-powerpc64-linux-musl` and running on Alpine Linux ppc64:

```
root@algol /t/rust-nightly-powerpc64-unknown-linux-musl# bash install.sh
install: creating uninstall script at /usr/local/lib/rustlib/uninstall.sh
install: installing component 'rustc'
install: installing component 'rust-std-powerpc64-unknown-linux-musl'
install: installing component 'cargo'
install: installing component 'rustfmt-preview'
install: installing component 'rust-analyzer-preview'
install: installing component 'llvm-tools-preview'
install: installing component 'clippy-preview'
install: installing component 'miri-preview'
install: installing component 'rust-analysis-powerpc64-unknown-linux-musl'
install: installing component 'llvm-bitcode-linker-preview'

    rust installed.

root@algol /t/rust-nightly-powerpc64-unknown-linux-musl# echo 'fn main() { println!("hello world"); }' > test.rs
root@algol /t/rust-nightly-powerpc64-unknown-linux-musl# which rustc
/usr/local/bin/rustc
root@algol /t/rust-nightly-powerpc64-unknown-linux-musl# rustc test.rs
root@algol /t/rust-nightly-powerpc64-unknown-linux-musl# ./test
hello world
root@algol /t/rust-nightly-powerpc64-unknown-linux-musl# file test
test: ELF 64-bit MSB pie executable, 64-bit PowerPC or cisco 7500, OpenPOWER ELF V2 ABI, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-powerpc64.so.1, BuildID[sha1]=90a0fa543b3d42588ad32c5b858e56ac9c56faed, with debug_info, not stripped
```

I renamed the glibc job and created a new one for musl since the same is done for the little-endian targets.

Implements rust-lang/rust#149938

try-job: dist-powerpc64-linux-gnu
try-job: dist-powerpc64-linux-musl
…r=Mark-Simulacrum

Fix(lib/win/net): Remove hostname support under Win7

Fixes rust-lang/rust#150896. `GetHostNameW` is not available under Windows 7, leading to dynamic linking failures upon program executions. For now, as it is still unstable, this therefore appropriately cfg-gates the feature in order to mark the Win7 as unsupported with regards to this particular feature. Porting the functionality for Windows 7 would require changing the underlying system call and so more work for the immediate need.

@rustbot label C-bug O-windows-7 T-libs A-io
…lation, r=Mark-Simulacrum

remote-test-server: Fix compilation on UEFI targets

Tested with:
./x build src/tools/remote-test-server --target x86_64-unknown-uefi
add `simd_splat` intrinsic

Add `simd_splat` which lowers to the LLVM canonical splat sequence.

```llvm
insertelement <N x elem> poison, elem %x, i32 0
shufflevector <N x elem> v0, <N x elem> poison, <N x i32> zeroinitializer
```

Right now we try to fake it using one of

```rust
fn splat(x: u32) -> u32x8 {
    u32x8::from_array([x; 8])
}
```

or (in `stdarch`)

```rust
fn splat(value: $elem_type) -> $name {
    #[derive(Copy, Clone)]
    #[repr(simd)]
    struct JustOne([$elem_type; 1]);
    let one = JustOne([value]);
    // SAFETY: 0 is always in-bounds because we're shuffling
    // a simd type with exactly one element.
    unsafe { simd_shuffle!(one, one, [0; $len]) }
}
```

Both of these can confuse the LLVM optimizer, producing sub-par code. Some examples:

- rust-lang/rust#60637
- rust-lang/rust#137407
- rust-lang/rust#122623
- rust-lang/rust#97804

---

As far as I can tell there is no way to provide a fallback implementation for this intrinsic, because there is no `const` way of evaluating the number of elements (there might be issues beyond that, too). So, I added implementations for all 4 backends.

Both GCC and const-eval appear to have some issues with simd vectors containing pointers. I have a workaround for GCC, but haven't yet been able to make const-eval work. See the comments below.

Currently this just adds the intrinsic, it does not actually use it anywhere yet.
compiletest: Make `aux-crate` directive explicitly handle `--extern` modifiers

With `-Zunstable-options` it is possible to pass options to `--extern`. See here for an exhaustive list of possible options:
https://github.com/rust-lang/rust/blob/b5dd72d2921500c9d9e15f074e1d831adcaa3dee/compiler/rustc_session/src/config.rs#L2356-L2367

Using these options works with the `aux-crate` directive, but only because the options pretend to be part of the name. Make it clearer what `aux-crate` supports by explicitly handling `--extern` options.

This PR is step one of splitting up rust-lang/rust#151258 into smaller pieces.

r? @Zalathar
std: `sleep_until` on Motor and VEX

This PR:
* Forwards the public `sleep_until` to the private `sleep_until` on Motor OS
* Adds a `sleep_until` implementation on VEX that yields until the deadline has passed

CC @lasiotus
CC @lewisfm @tropicaaal @Gavin-Niederman @max-niederman
Add Korean translation to Rust By Example

Hello,

I’ve added a Korean translation file to Rust By Example.
This contribution will help Korean readers learn Rust more easily by providing localized explanations and examples.

Please review the proposed additions when you have time.

Thanks in advance for your time and review! 🙏

Add Korean translation. Thanks in advance.
Extend build-manifest local test guide

Fill in more blanks about how to test build-manifest changes with Rustup.

Figured this out while working on rust-lang/rust#151156, with the help of bjorn3.
…acrum

std: use 64-bit `clock_nanosleep` on GNU/Linux if available

glibc 2.31 added support for both 64-bit `clock_gettime` and 64-bit `clock_nanosleep`. Thus, if [`__clock_nanosleep_time64`](https://sourceware.org/git/?p=glibc.git;a=blob;f=include/time.h;h=22b29ca583549488a0e5395cb820f55ec6e38e5f;hb=e14a91e59d35bf2fa649a9726ccce838b8c6e4b7#l322) and the underlying syscall are available, use them for implementing `sleep_until` to avoid having to fall back to `nanosleep` for long-duration sleeps.
Fix cstring-merging test for Hexagon target

Hexagon assembler uses `.string` directive instead of `.asciz` for null-terminated strings. Both are equivalent but the test was only checking for `.asciz`.

Update the CHECK patterns to accept both directives using `.{{asciz|string}}` regex pattern.
Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#149962 (Promote powerpc64-unknown-linux-musl to tier 2 with host tools)
 - rust-lang/rust#150138 (Add new Tier 3 targets for ARMv6)
 - rust-lang/rust#150905 (Fix(lib/win/net): Remove hostname support under Win7)
 - rust-lang/rust#151094 (remote-test-server: Fix compilation on UEFI targets)
 - rust-lang/rust#151346 (add `simd_splat` intrinsic)
 - rust-lang/rust#151353 (compiletest: Make `aux-crate` directive explicitly handle `--extern` modifiers)
 - rust-lang/rust#151538 (std: `sleep_until` on Motor and VEX)
 - rust-lang/rust#151098 (Add Korean translation to Rust By Example)
 - rust-lang/rust#151157 (Extend build-manifest local test guide)
 - rust-lang/rust#151403 (std: use 64-bit `clock_nanosleep` on GNU/Linux if available)
 - rust-lang/rust#151571 (Fix cstring-merging test for Hexagon target)
abi: add a rust-preserve-none calling convention

This is the conceptual opposite of the rust-cold calling convention and is particularly useful in combination with the new `explicit_tail_calls` feature.

For relatively tight loops implemented with tail calling (`become`) each of the function with the regular calling convention is still responsible for restoring the initial value of the preserved registers. So it is not unusual to end up with a situation where each step in the tail call loop is spilling and reloading registers, along the lines of:

    foo:
        push r12
        ; do things
        pop r12
        jmp next_step

This adds up quickly, especially when most of the clobberable registers are already used to pass arguments or other uses.

I was thinking of making the name of this ABI a little less LLVM-derived and more like a conceptual inverse of `rust-cold`, but could not come with a great name (`rust-cold` is itself not a great name: cold in what context? from which perspective? is it supposed to mean that the function is rarely called?)
…r=cjgillot

Fix suppression of `unused_assignment` in binding of `unused_variable`

Unused assignments to an unused variable should trigger only the `unused_variables` lint and not also the `unused_assignments` lint. This was previously implemented by checking whether the span of the assignee was within the span of the binding pattern, however that failed to capture situations was imported from elsewhere (eg from the input tokenstream of a proc-macro that generates the binding pattern).

By comparing the span of the assignee to those of the variable introductions instead, a reported stable-to-stable regression is resolved.

This fix also impacted some other preexisting tests, which had (undesirably) been triggering both the `unused_variables` and `unused_assignments` lints on the same initializing assignment; those tests have therefore now been updated to expect only the former lint.

Fixes rust-lang/rust#151514
r? cjgillot (as author of reworked liveness testing in rust-lang/rust#142390)
optimize `vec.extend(slice.to_vec())`, take 2

Redoing rust-lang/rust#130998
It was reverted in rust-lang/rust#151150 due to flakiness. I have traced this to layout randomization perturbing the test (the failure reproduces locally with layout randomization), which is now excluded.
This updates the rust-version file to 873d4682c7d285540b8f28bfe637006cef8918a6.
@rustbot
Copy link
Collaborator

rustbot commented Jan 26, 2026

Thanks for the PR. If you have write access, feel free to merge this PR if it does not need reviews. You can request a review using r? rustc-dev-guide or r? <username>.

@rustbot rustbot added the S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content label Jan 26, 2026
@tshepang tshepang merged commit ddf8a81 into main Jan 26, 2026
1 check passed
@rustbot rustbot removed the S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content label Jan 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants