Skip to content

Conversation

@workflows-miri
Copy link

@workflows-miri workflows-miri bot commented Dec 5, 2025

Merge ref '864339abf952' from rust-lang/rust

Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: 864339abf952f07098dd82610256338520167d4a
Filtered ref: f6ad94b
Upstream diff: rust-lang/rust@3ff30e7...864339a

This merge was created using https://github.com/rust-lang/josh-sync.

bors and others added 20 commits November 30, 2025 07:16
yet another improvment to rustdoc js typechecking

biggest improvment is the docs for `FunctionType` and the signatures for functions that accept names of crates were both slightly wrong, this has now been fixed.
miri subtree update

Subtree update of `miri` to 0749929.

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

r? `@ghost`
Clarify edge cases for Barrier::new

... since n-1 is undefined when the usize n is 0.
collapse `constness` query `match` logic

We already have the HIR node data, so no need for asking `def_kind` again.

r? oli-obk
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#149236 (Clarify edge cases for Barrier::new)
 - rust-lang/rust#149444 (collapse `constness` query `match` logic)
 - rust-lang/rust#149475 (float::min/max: reference NaN bit pattern rules)

r? `@ghost`
`@rustbot` modify labels: rollup
add a missing comma to default r-a settings file
ThreadId generation fallback path: avoid spurious yields

Fixes #4737
Alternative to rust-lang/rust#149476
Cc `@orlp` `@joboet`
Compute jump threading opportunities in a single pass

The current implementation of jump threading walks MIR CFG backwards from each `SwitchInt` terminator. This PR replaces this by a single postorder traversal of MIR. In theory, we could do a full fixpoint dataflow analysis, but this has low returns as we forbid threading through a loop header.

The second commit in this PR modifies the carried state to a lighter data structure. The current implementation uses some kind of `IndexVec<ValueIndex, &[Condition]>`. This is needlessly heavy, as the state rarely ever carries more than a few `Condition`s. The first commit replaces this state with a simpler `&[Condition]`, and puts the corresponding `ValueIndex` inside `Condition`.

The three later commits are perf tweaks.

The sixth commit is the main change. Instead of carrying the goto target inside the condition, we maintain a set of conditions associated with each block, and their consequences in following blocks. Think: if this condition is fulfilled in this block, then that condition is fulfilled in that block. This makes the threading algorithm much easier to implement, without the extra bookkeeping of `ThreadingOpportunity` we had.

Later commits modify that algorithm to shrink the set of duplicated blocks. By propagating fulfilled conditions down the CFG, and trimming costly threads.
In `BTreeMap::eq`, do not compare the elements if the sizes are different.

Reverts rust-lang/rust#147101 in library/alloc/src/btree/

rust-lang/rust#147101 replaced some instances of code like `a.len() == b.len() && a.iter().eq(&b)` with just `a.iter().eq(&b)`, but the optimization that PR introduced only applies for `TrustedLen` iterators, and `BTreeMap`'s itertors are not `TrustedLen`, so this theoretically regressed perf for comparing large `BTreeMap`/`BTreeSet`s with unequal lengths but equal prefixes, (and also made it so that comparing two different-length `BTreeMap`/`BTreeSet`s with elements whose `PartialEq` impls that can panic now can panic, though this is not a "promised" behaviour either way (cc rust-lang/rust#149122))

Given that `TrustedLen` is an unsafe trait, I opted to not implement it for `BTreeMap`'s iterators, and instead just revert the change. If someone else wants to audit `BTreeMap`'s iterators to make sure they always return the right number of items (even in the face of incorrect user `Ord` impls) and then implement `TrustedLen` for them so that the optimization works for them, then this can be closed in favor of that (or if the perf regression is deemed too theoretical, this can be closed outright).

Example of theoretical perf regression: https://play.rust-lang.org/?version=beta&mode=release&edition=2024&gist=a37e3d61e6bf02669b251315c9a44fe2 (very rough estimates, using `Instant::elapsed`).
In release mode on stable the comparison takes ~23.68µs.
In release mode on beta/nightly the comparison takes ~48.351057ms.
Tidying up UI tests [6/N]

> [!NOTE]
> Intermediate commits are intended to help review, but will be squashed add comment commit prior to merge.

part of rust-lang/rust#133895

removed directory  `tests/ui/trait-objects`,  `tests/ui/for`, `tests/ui/warnings`

`trait-objects` -> `traits/object`
`for` -> `for-loop-while` (except `for/issue-20605.rs` test. this relocated to `traits/dyn-iterator-deref-in-for-loop.rs`)
`warnings` -> `resolve`, `entry-point`

r? Kivooeo
powf, powi: point out SNaN non-determinism

The non-determinism has two sources:
- LLVM reserves the right to treat signaling NaNs as-if they were quiet, so it may fold `powf(x, 0)` to `1` even if `x` might be a signaling NaN.
- Some libm `pow` implementations (e.g. the one in musl) don't implement the signaling NaN special-case. See https://rust.godbolt.org/z/chsbv5v4d.

Cc `@tgross35` `@Amanieu`
Use branch name instead of HEAD when unshallowing

Fixes a regression with the beta channel that was discovered in rust-lang/rust#149572.

r? `@cuviper`
Apply the `bors` environment also to the `outcome` job

To fix passing the toolstate token to `publish_toolstate.sh`. Found in https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/TOOLSTATE_REPO_ACCESS_TOKEN/with/561580948.

r? ehuss
Don't require a normal tool build of clippy/rustfmt when running their test steps

This is redundant and wasteful.

Noticed in rust-lang/rust#147372 (comment).
Point to the item that is incorrectly annotated with `#[diagnostic::on_const]`

close rust-lang/rust#149606

r? estebank
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#147224 (Emscripten: Turn wasm-eh on by default)
 - rust-lang/rust#149405 (Recover on misspelled item keyword)
 - rust-lang/rust#149443 (Tidying up UI tests [6/N])
 - rust-lang/rust#149524 (Move attribute safety checking to attribute parsing)
 - rust-lang/rust#149593 (powf, powi: point out SNaN non-determinism)
 - rust-lang/rust#149605 (Use branch name instead of HEAD when unshallowing)
 - rust-lang/rust#149612 (Apply the `bors` environment also to the `outcome` job)
 - rust-lang/rust#149623 (Don't require a normal tool build of clippy/rustfmt when running their test steps)
 - rust-lang/rust#149627 (Point to the item that is incorrectly annotated with `#[diagnostic::on_const]`)

r? `@ghost`
`@rustbot` modify labels: rollup
Update cargo submodule

9 commits in bd979347d814dfe03bba124165dbce9554d0b4d8..2c283a9a5c5968eeb9a8f12313f04feb1ff8dfac
2025-12-02 16:03:50 +0000 to 2025-12-04 16:47:28 +0000
- fix(publish): Move `.crate` out of final artifact location (rust-lang/cargo#15915)
- Remove legacy tmpdir support (rust-lang/cargo#16342)
- Run clippy CI on more targets (rust-lang/cargo#16340)
- feat: support for rustdoc mergeable cross-crate info (rust-lang/cargo#16309)
- fix(timings): unlocked -&gt; unblocked (rust-lang/cargo#16337)
- fix(layout): Put examples in their unit dir in new layout (rust-lang/cargo#16335)
- fix(frontmatter): Restrict code fence length  (rust-lang/cargo#16334)
- Update resolver.md: fix compile errors in pseudocode (rust-lang/cargo#16333)
- fix(fingerprint): clean doc dirs for only requested targets (rust-lang/cargo#16331)

This is best being merged before beta cutoff because rust-lang/cargo#16337 is a nightly regression.
This updates the rust-version file to 864339abf952f07098dd82610256338520167d4a.
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: 864339abf952f07098dd82610256338520167d4a
Filtered ref: f6ad94b
Upstream diff: rust-lang/rust@3ff30e7...864339a

This merge was created using https://github.com/rust-lang/josh-sync.
@rustbot
Copy link
Collaborator

rustbot commented Dec 5, 2025

Thank you for contributing to Miri! A reviewer will take a look at your PR, typically within a week or two.
Please remember to not force-push to the PR branch except when you need to rebase due to a conflict or when the reviewer asks you for it.

@rustbot rustbot added the S-waiting-on-review Status: Waiting for a review to complete label Dec 5, 2025
@oli-obk oli-obk added this pull request to the merge queue Dec 5, 2025
Merged via the queue into master with commit 15c5042 Dec 5, 2025
14 checks passed
@oli-obk oli-obk deleted the rustup-2025-12-05 branch December 5, 2025 07:10
@rustbot rustbot removed the S-waiting-on-review Status: Waiting for a review to complete label Dec 5, 2025
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.

6 participants