Skip to content

Rollup of 20 pull requests#152785

Merged
rust-bors[bot] merged 42 commits intorust-lang:mainfrom
Zalathar:rollup-UGtEsqh
Feb 18, 2026
Merged

Rollup of 20 pull requests#152785
rust-bors[bot] merged 42 commits intorust-lang:mainfrom
Zalathar:rollup-UGtEsqh

Conversation

@Zalathar
Copy link
Member

Successful merges:

r? @ghost

Create a similar rollup

nickkuk and others added 30 commits February 5, 2026 16:34
I think the previous wording as either wrong or confusing. I would
consider the CLI flags at a *lower* ranking, since source attributes are
able to override the CLI flag.
…dness"

Because:
* Something like it did not exist before PR 107404
* That it is not run our mir-opt-level 0 indicates that it is not
  required for soundness
* Its `MirPass::can_be_overridden()` is unchanged and thus returns true,
  indicating that it is not a required MIR pass.
* No test fails in PR 151426 that stops enabling by default in non-optimized builds

As can be seen from the updated test `tests/mir-opt/optimize_none.rs`,
this means that `#[optimize(none)]` functions become even less
optimized. As expected and as desired.
* Find ref prefix span for owned suggestions
* Improve missing lifetime suggestions for `&mut str`
Remove "failed to resolve" and use the same format we use in other resolution errors "cannot find `name`".

```
error[E0433]: cannot find `nonexistent` in `existent`
  --> $DIR/custom_attr_multisegment_error.rs:5:13
   |
LL | #[existent::nonexistent]
   |             ^^^^^^^^^^^ could not find `nonexistent` in `existent`
```
…r=petrochenkov

Unify wording of resolve error

Remove "failed to resolve" from the main error message and use the same format we use in other resolution errors "cannot find `name`":

```
error[E0433]: cannot find `nonexistent` in `existent`
  --> $DIR/custom_attr_multisegment_error.rs:5:13
   |
LL | #[existent::nonexistent]
   |             ^^^^^^^^^^^ could not find `nonexistent` in `existent`
```

The intent behind this is to end up with all resolve errors eventually be on the form of

```
error[ECODE]: cannot find `{NAME}` in {SCOPE}
  --> $DIR/file.rs:5:13
   |
LL | #[existent::nonexistent]
   |             ^^^^^^^^^^^ {SPECIFIC LABEL}
```

A category of errors that is interest are those that involve keywords. For example:

```
error[E0433]: cannot find `Self` in this scope
  --> $DIR/issue-97194.rs:2:35
   |
LL |     fn bget(&self, index: [usize; Self::DIM]) -> bool {
   |                                   ^^^^ `Self` is only available in impls, traits, and type definitions
```
and

```
error[E0433]: cannot find `super` in this scope
  --> $DIR/keyword-super.rs:2:9
   |
LL |     let super: isize;
   |         ^^^^^ there are too many leading `super` keywords
```

For these the label provides the actual help, while the message is less informative beyond telling you "couldn't find `name`".

This is an off-shoot of rust-lang#126810 and rust-lang#128086, a subset of the intended changes there with review comments applied.

r? @petrochenkov
…ffleLapkin

tail calls: fix copying non-scalar arguments to callee

Alternative to rust-lang#144933: when invoking a tail call with a non-scalar argument, we need to delay freeing the caller's local variables until after the callee is initialized, so that we can copy things from the caller to the callee.

Fixes rust-lang#144820... but as the FIXMEs in the code show, it's not clear to me whether these are the right semantics.
r? @WaffleLapkin
…ired, r=cjgillot

compiler: Don't mark `SingleUseConsts` MIR pass as "required for soundness"

I don't think this MIR pass is required for soundness. The reasons are:
* Something like it was not enabled by default before PR rust-lang#107404 which was the precursor to `SingleUseConsts` (see rust-lang#125910 for the switch).
* By following the advice from rust-lang#128657 (comment) we can conclude it is not required for soundness since it has only ever run on MIR opt level > 0.
* Its [`MirPass::can_be_overridden()`](https://github.com/rust-lang/rust/blob/0ee7d96253f92b15115c94a530db8b79cb341b15/compiler/rustc_mir_transform/src/pass_manager.rs#L98-L102) is unchanged and thus returns `true`, indicating that it is not a required MIR pass.
* PR CI pass in rust-lang#151426 which stops enabling it by default in non-optimized builds.

As shown in the updated test `tests/mir-opt/optimize_none.rs`, `#[optimize(none)]` functions become even less optimized, as expected and desired.

Unblocks rust-lang#151426.
Rename dep node "fingerprints" to distinguish key and value hashes

In the query system's dependency graph, each node is associated with two *fingerprints*: one that is typically a hash of the query key, and one that is typically a hash of the query's return value when called with that key.

Unfortunately, many identifiers and comments fail to clearly distinguish between these two kinds of fingerprint, which have very different roles in dependency tracking. This is a frequent source of confusion.

This PR therefore tries to establish a clear distinction between:

- **Key fingerprints** that help to uniquely identify a node (along with its `DepKind`), and are typically a hash of the query key
- **Value fingerprints** that help to determine whether a node can be marked green (despite having red dependencies), and are typically a hash of the query value

There should be no change to compiler behaviour.

r? nnethercote (or compiler)
remove the explicit error for old `rental` versions

This was converted to a hard error 20 months ago (in rust-lang#125596). This seems like enough time for anyone still using it to notice, so remove the note entirely now.
In comparison, the explicit note for the more impactful `time` breakage was already removed after 6 months (rust-lang#129343).

Closes rust-lang#73933.
Closes rust-lang#83125.

r? @petrochenkov
Remove ShallowInitBox.

All uses of this were removed by rust-lang#148190
Split from rust-lang#147862

r? @RalfJung
Fix invalid `mut T` suggestion for `&mut T` in missing lifetime error

close: rust-lang#150077

When suggesting to return an owned value instead of a borrowed one, the diagnostic was only removing `&` instead of `&mut `, resulting in invalid syntax like `mut T`. This PR fixes the span calculation to properly cover the entire `&mut ` prefix.
@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 18, 2026
@Zalathar
Copy link
Member Author

@bors try jobs=x86_64-msvc-1,i686-msvc-1,x86_64-mingw-1,test-various,armhf-gnu,aarch64-apple,x86_64-gnu-debug,x86_64-gnu-llvm-20-3

@rust-bors

This comment has been minimized.

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


try-job: x86_64-msvc-1
try-job: i686-msvc-1
try-job: x86_64-mingw-1
try-job: test-various
try-job: armhf-gnu
try-job: aarch64-apple
try-job: x86_64-gnu-debug
try-job: x86_64-gnu-llvm-20-3
@rust-bors

This comment has been minimized.

@JonathanBrouwer
Copy link
Contributor

JonathanBrouwer commented Feb 18, 2026

FYI the previous PR had severely degraded CI speed on dist-arm-linux-musl causing the job not to finish in time, in case that happens again here

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 18, 2026

☀️ Try build successful (CI)
Build commit: f0587b2 (f0587b23575f5c018177af87cfa011ec829d352d, parent: 8387095803f21a256a9a772ac1f9b41ed4d5aa0a)

@Zalathar
Copy link
Member Author

Zalathar commented Feb 18, 2026

FYI the previous PR had severely degraded CI speed on dist-arm-linux-musl causing the job not to finish in time, in case that happens again here

The beta revert previously failed on a different job timing out, so I imagine GH runners are just being randomly weird again.

@JonathanBrouwer
Copy link
Contributor

JonathanBrouwer commented Feb 18, 2026

Seems to be slow again :c

@rust-bors rust-bors bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 18, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 18, 2026

☀️ Test successful - CI
Approved by: Zalathar
Duration: 5h 59m 29s
Pushing c043085 to main...

@rust-bors rust-bors bot merged commit c043085 into rust-lang:main Feb 18, 2026
13 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Feb 18, 2026
@github-actions
Copy link
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 8387095 (parent) -> c043085 (this PR)

Test differences

Show 1256 test diffs

Stage 1

  • [run-make] tests/run-make/mir-opt-bisect-limit: [missing] -> pass (J0)
  • [ui] tests/ui/associated-types/suggest-param-env-shadowing-incompatible-args.rs: [missing] -> pass (J0)
  • [ui] tests/ui/imports/overwrite-different-vis-3.rs: [missing] -> pass (J0)
  • [ui] tests/ui/lifetimes/mut-ref-owned-suggestion.rs: [missing] -> pass (J0)
  • [ui] tests/ui/lifetimes/trait-impl-mismatch-elided-lifetime-issue-65866.rs: [missing] -> pass (J0)
  • [ui] tests/ui/proc-macro/pretty-print-hack-hide.rs: pass -> [missing] (J0)
  • [ui] tests/ui/proc-macro/pretty-print-hack-show.rs#local: pass -> [missing] (J0)
  • [ui] tests/ui/proc-macro/pretty-print-hack-show.rs#remapped: pass -> [missing] (J0)
  • [ui] tests/ui/proc-macro/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs: ignore (ignored used by another main test file ((used by ../../../pretty-print-hack-show.rs))) -> [missing] (J0)
  • [ui] tests/ui/proc-macro/pretty-print-hack/rental-0.5.5/src/lib.rs: ignore (ignored used by another main test file ((used by ../../../pretty-print-hack-show.rs))) -> [missing] (J0)
  • [ui] tests/ui/proc-macro/pretty-print-hack/rental-0.5.6/src/lib.rs: ignore (ignored used by another main test file ((used by ../../../pretty-print-hack/hide.rs))) -> [missing] (J0)
  • [ui] tests/ui/resolve/exported-macro-in-mod-147958.rs: [missing] -> pass (J0)

Stage 2

  • [ui] tests/ui/associated-types/suggest-param-env-shadowing-incompatible-args.rs: [missing] -> pass (J1)
  • [ui] tests/ui/imports/overwrite-different-vis-3.rs: [missing] -> pass (J1)
  • [ui] tests/ui/lifetimes/mut-ref-owned-suggestion.rs: [missing] -> pass (J1)
  • [ui] tests/ui/lifetimes/trait-impl-mismatch-elided-lifetime-issue-65866.rs: [missing] -> pass (J1)
  • [ui] tests/ui/proc-macro/pretty-print-hack-hide.rs: pass -> [missing] (J1)
  • [ui] tests/ui/proc-macro/pretty-print-hack-show.rs#local: pass -> [missing] (J1)
  • [ui] tests/ui/proc-macro/pretty-print-hack-show.rs#remapped: pass -> [missing] (J1)
  • [ui] tests/ui/resolve/exported-macro-in-mod-147958.rs: [missing] -> pass (J1)
  • [ui] tests/ui/proc-macro/pretty-print-hack/allsorts-rental-0.5.6/src/lib.rs: ignore (ignored used by another main test file ((used by ../../../pretty-print-hack-show.rs))) -> [missing] (J2)
  • [ui] tests/ui/proc-macro/pretty-print-hack/rental-0.5.5/src/lib.rs: ignore (ignored used by another main test file ((used by ../../../pretty-print-hack-show.rs))) -> [missing] (J2)
  • [ui] tests/ui/proc-macro/pretty-print-hack/rental-0.5.6/src/lib.rs: ignore (ignored used by another main test file ((used by ../../../pretty-print-hack/hide.rs))) -> [missing] (J2)
  • [run-make] tests/run-make/mir-opt-bisect-limit: [missing] -> pass (J3)

Additionally, 1232 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard c043085801b7a884054add21a94882216df5971c --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-arm-linux-musl: 1h 37m -> 5h 51m (+261.6%)
  2. dist-x86_64-solaris: 1h 33m -> 5h 3m (+224.0%)
  3. dist-sparcv9-solaris: 1h 31m -> 4h 34m (+201.4%)
  4. dist-x86_64-musl: 2h 10m -> 5h 6m (+136.1%)
  5. dist-armhf-linux: 1h 26m -> 2h 39m (+84.5%)
  6. dist-powerpc64le-linux-musl: 1h 32m -> 2h 50m (+83.4%)
  7. dist-powerpc64-linux-musl: 1h 32m -> 2h 47m (+80.9%)
  8. dist-x86_64-netbsd: 1h 26m -> 2h 32m (+76.4%)
  9. dist-powerpc64le-linux-gnu: 1h 36m -> 2h 49m (+75.8%)
  10. dist-arm-linux-gnueabi: 1h 26m -> 2h 29m (+73.5%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#145399 Unify wording of resolve error d060fad6ee747e6533c1ca7654f8934f85b3ad25 (link)
#150473 tail calls: fix copying non-scalar arguments to callee 8fa9c6622efeb9ac6af2ac5606e60ebc25b30260 (link)
#151530 Fix invalid mut T suggestion for &mut T in missing life… 00ecc524f22d431ea051dfcbe66103808f5226e5 (link)
#152179 Add documentation note about signed overflow direction 746fa7cafe4464714eb4e9cb44b6b4b0d6a7d936 (link)
#152474 Implement opt-bisect-limit for MIR fb7f07d3b0365cd61d6fcddd2da798c3d524e032 (link)
#152509 tests/ui/test-attrs: add annotations for reference rules 4cf1be9c0cc3d54c78fcded24fabcd84e9f31fa6 (link)
#152637 Add a note about elided lifetime eb41ee0274be59233ecdabc7842d675b4e1c1b9d (link)
#152672 std: use libc version of _NSGetArgc/_NSGetArgv 92b635cdbe4f0fd9e17e183c061b5429de9e1ac6 (link)
#152711 resolve: Disable an assert that no longer holds 527f9855546adaee38844dd5f195257ede2f0c10 (link)
#152725 Rework explanation of CLI lint level flags ad4c22166c100a822307d387e04a02dbf180cdc8 (link)
#152729 compiler: Don't mark SingleUseConsts MIR pass as "require… f851be291a8407b02c153919f1ba56a59cda26c1 (link)
#152732 add regression test for 147958 5a43551d8fae03b697e9b979ff937c69674ab92e (link)
#152745 Fix ICE in suggest_param_env_shadowing with incompatible … 24a4d66dc93cdd1498060343daf52f5bddcee146 (link)
#152749 make rustc_allow_const_fn_unstable an actual `rustc_attrs… 44b5c22d1a471b81ae37b8679735eb51fac67965 (link)
#152751 Rename dep node "fingerprints" to distinguish key and value… 8cf907507726eb165fa11abb134fba61a0a6f8c8 (link)
#152753 remove the explicit error for old rental versions a9f6c149ea33538045a36341e657dfd6a7275086 (link)
#152756 Miri: recursive validity: also recurse into Boxes 484da61b650a50e6667669edd106b0ff86568c7a (link)
#152758 Remove ShallowInitBox. e6569bc98f71b41e99f24c72508b0ca3ba728af0 (link)
#152770 carryless_mul: mention the base e71bbc07438e67971fbe42d7906d2f6be9ca2d74 (link)
#152778 Update tracking issue number for final_associated_functions f08fc6788b77134ec88d3ebdc396c69de7d35949 (link)

previous master: 8387095803

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (c043085): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -2.3%, secondary -2.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
3.2% [3.2%, 3.2%] 1
Regressions ❌
(secondary)
5.6% [5.6%, 5.6%] 1
Improvements ✅
(primary)
-3.7% [-4.4%, -3.2%] 4
Improvements ✅
(secondary)
-3.9% [-5.1%, -3.0%] 4
All ❌✅ (primary) -2.3% [-4.4%, 3.2%] 5

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 480.396s -> 479.769s (-0.13%)
Artifact size: 397.88 MiB -> 397.87 MiB (-0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-run-make Area: port run-make Makefiles to rmake.rs merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Comments