Skip to content

Conversation

@chenyukang
Copy link
Member

@chenyukang chenyukang commented Jan 11, 2026

Fixes #149889

@rustbot
Copy link
Collaborator

rustbot commented Jan 11, 2026

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@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 Jan 11, 2026
@rustbot
Copy link
Collaborator

rustbot commented Jan 11, 2026

r? @fee1-dead

rustbot has assigned @fee1-dead.
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

@fee1-dead
Copy link
Member

@bors r+ rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 18, 2026

📌 Commit ea93fb5 has been approved by fee1-dead

It is now in the queue for this repository.

@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 Jan 18, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Jan 18, 2026
…=fee1-dead

Underscore-prefixed bindings are explicitly allowed to be unused

Fixes rust-lang#149889
rust-bors bot pushed a commit that referenced this pull request Jan 18, 2026
Rollup of 9 pull requests

Successful merges:

 - #148769 (Stabilize `alloc_layout_extra`)
 - #149440 (Remove suggestion from importing unstable items on stable channel)
 - #150200 (Add title field to `ice.md` issue template)
 - #150955 (Underscore-prefixed bindings are explicitly allowed to be unused)
 - #151200 (time: Add saturating arithmetic for `SystemTime`)
 - #151235 (Change field `bit_width: usize` to `bits: u32` in type info)
 - #151242 (Port #[needs_allocator] to attribute parser)
 - #151274 (Include a link to `count_ones` in the docs for `uN::count_zeros` [docs only])
 - #151279 (remove trailing periods in built-in attribute gate messages)

r? @ghost
rust-bors bot pushed a commit that referenced this pull request Jan 18, 2026
Rollup of 8 pull requests

Successful merges:

 - #148769 (Stabilize `alloc_layout_extra`)
 - #150200 (Add title field to `ice.md` issue template)
 - #150955 (Underscore-prefixed bindings are explicitly allowed to be unused)
 - #151200 (time: Add saturating arithmetic for `SystemTime`)
 - #151235 (Change field `bit_width: usize` to `bits: u32` in type info)
 - #151242 (Port #[needs_allocator] to attribute parser)
 - #151274 (Include a link to `count_ones` in the docs for `uN::count_zeros` [docs only])
 - #151279 (remove trailing periods in built-in attribute gate messages)

r? @ghost
@rust-bors rust-bors bot merged commit 0331284 into rust-lang:main Jan 18, 2026
11 checks passed
@rustbot rustbot added this to the 1.94.0 milestone Jan 18, 2026
rust-timer added a commit that referenced this pull request Jan 18, 2026
Rollup merge of #150955 - yukang-fix-149889-unused-assign, r=fee1-dead

Underscore-prefixed bindings are explicitly allowed to be unused

Fixes #149889
@panstromek
Copy link
Contributor

Investigating regression from #151291, as_str is potentially expensive and there's not many other candidates in that PR.

@rust-timer build a4ae3dd

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (a4ae3dd): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
0.2% [0.2%, 0.3%] 3
Regressions ❌
(secondary)
0.1% [0.0%, 0.4%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.1% [-0.1%, -0.0%] 3
All ❌✅ (primary) 0.2% [0.2%, 0.3%] 3

Max RSS (memory usage)

Results (secondary -2.8%)

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

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.8% [1.0%, 2.6%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.9% [-5.5%, -1.7%] 8
All ❌✅ (primary) - - 0

Cycles

Results (secondary 4.0%)

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

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
5.7% [2.0%, 10.5%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.8% [-2.8%, -2.8%] 1
All ❌✅ (primary) - - 0

Binary size

Results (primary -0.0%, secondary -0.0%)

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

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.0% [-0.0%, -0.0%] 14
Improvements ✅
(secondary)
-0.0% [-0.1%, -0.0%] 6
All ❌✅ (primary) -0.0% [-0.0%, -0.0%] 14

Bootstrap: 474.856s -> 470.984s (-0.82%)
Artifact size: 383.43 MiB -> 383.47 MiB (0.01%)

@rustbot rustbot added the perf-regression Performance regression. label Jan 19, 2026
@chenyukang
Copy link
Member Author

I think the check should be moved to a new place here:
https://github.com/chenyukang/rust/blob/ea93fb548c7c6e838b35893f3f9cc2ed3011aaea/compiler/rustc_mir_transform/src/liveness.rs#L1121

so that it will only check when unused is reported, and will not affect normal code path.
I fired a new PR to fix the performance issue?

@panstromek
Copy link
Contributor

panstromek commented Jan 19, 2026

Nice, but this still doesn't explain all regressions in that rollup. I'll check other PRs, too.

@cuviper cuviper modified the milestones: 1.94.0, 1.95.0 Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf-regression Performance regression. 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.

Regression unused_assignments for variable with underscore prefix captured by closure

6 participants