Skip to content

Next steps for FnDef binder changes (instantiate most FnDef binders) - #159403

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
addiesh:call-me-turbofishmael
Aug 4, 2026
Merged

Next steps for FnDef binder changes (instantiate most FnDef binders)#159403
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
addiesh:call-me-turbofishmael

Conversation

@addiesh

@addieshaddiesh commented Jul 16, 2026

Copy link
Copy Markdown

View all comments

This change is a part of the ongoing effort to clean up binder/turbofishing behavior in the compiler (#156581).

This PR instantiates binders that were previously created via ty::Binder::dummy() with meaningfully bound vars.

r? oli-obk

Call me Turbofishmael.
Some years ago- never mind how long precisely-
having little or no money in my purse,
and nothing particular to interest me in C++,
I thought I would sail about a little and see the rusty part of the world.

@rustbotrustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Jul 16, 2026
@rustbot

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, and welcome! The Rust Project is excited to review your changes, and you should hear from @oli-obk (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@addiesh
addieshforce-pushed the call-me-turbofishmael branch 3 times, most recently from 014b214 to d780036CompareJuly 16, 2026 19:40
@rust-log-analyzer

This comment has been minimized.

@addiesh

This comment was marked as resolved.

@addiesh
addieshforce-pushed the call-me-turbofishmael branch from d780036 to 6e740baCompareJuly 16, 2026 20:10
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@addiesh
addieshforce-pushed the call-me-turbofishmael branch from 330681e to 83e428cCompareJuly 17, 2026 15:14
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@addiesh
addieshforce-pushed the call-me-turbofishmael branch from 9fb9767 to 3920a9eCompareJuly 17, 2026 22:34
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@addiesh
addieshforce-pushed the call-me-turbofishmael branch from 5373d53 to f118249CompareJuly 20, 2026 15:15
@rust-log-analyzer

This comment has been minimized.

@addiesh
addieshforce-pushed the call-me-turbofishmael branch from f118249 to 6aeb29eCompareJuly 20, 2026 15:28
@rust-log-analyzer

This comment has been minimized.

@addiesh
addieshforce-pushed the call-me-turbofishmael branch from 6aeb29e to ac8e8e5CompareJuly 20, 2026 15:33
@addiesh
addiesh marked this pull request as ready for review July 20, 2026 15:48
@addiesh

This comment was marked as resolved.

Comment threadtests/ui/generics/binder-arg-overflow-regression-133613.rs Outdated
@addiesh
addieshforce-pushed the call-me-turbofishmael branch from d8350cc to 85d2121CompareJuly 29, 2026 14:52
@rustbot

This comment was marked as outdated.

@rustbotrustbot added A-rustdoc-js Area: Rustdoc's JS front-end A-tidy Area: The tidy tool O-windows Operating system: Windows labels Jul 31, 2026
@rustbot

This comment has been minimized.

@addiesh

addiesh commented Jul 31, 2026

Copy link
Copy Markdown
Author

ohhh no
(context to anyone who got pinged by rustbot: i messed up a rebase. you should be able to ignore this 😅️)

@GuillaumeGomez

Copy link
Copy Markdown
Member

git reflog will be your friend here. 😉

@addiesh
addieshforce-pushed the call-me-turbofishmael branch 2 times, most recently from 85d2121 to 71f6804CompareJuly 31, 2026 15:36
@rustbot

This comment has been minimized.

@addiesh
addieshforce-pushed the call-me-turbofishmael branch from 71f6804 to a66936dCompareJuly 31, 2026 16:03
Comment threadcompiler/rustc_mir_transform/src/elaborate_drop.rs Outdated
@rustbot

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@oli-obk

Copy link
Copy Markdown
Contributor

@bors r+

@rust-bors

rust-borsBot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

📌 Commit dd17e77 has been approved by oli-obk

It is now in the queue for this repository.

@JonathanBrouwer

Copy link
Copy Markdown
Member

@bors rollup=iffy
Including this in a special perf-sensitive rollup

@JonathanBrouwer

Copy link
Copy Markdown
Member

Verifying that actual perf results after merge match expected results
@rust-timer build ec3341f

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (ec3341f): comparison URL.

Overall result: ❌ regressions - please read:

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

Next, please: If you can, justify the regressions found in this try perf run in writing along with @rustbot label: +perf-regression-triaged. If not, fix the regressions and do another perf run. Neutral or positive results will clear the label automatically.

@bors rollup=never rustc-perf
@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.

meanrangecount
Regressions ❌
(primary)
0.3%[0.2%, 0.4%]18
Regressions ❌
(secondary)
0.4%[0.2%, 0.6%]6
Improvements ✅
(primary)
-0.2%[-0.2%, -0.2%]1
Improvements ✅
(secondary)
--0
All ❌✅ (primary)0.3%[-0.2%, 0.4%]19

Max RSS (memory usage)

Results (primary 0.3%, secondary -1.5%)

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

meanrangecount
Regressions ❌
(primary)
0.6%[0.4%, 0.7%]3
Regressions ❌
(secondary)
0.7%[0.5%, 0.9%]2
Improvements ✅
(primary)
-0.4%[-0.4%, -0.4%]1
Improvements ✅
(secondary)
-5.9%[-5.9%, -5.9%]1
All ❌✅ (primary)0.3%[-0.4%, 0.7%]4

Cycles

Results (primary -0.4%, secondary 0.0%)

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

meanrangecount
Regressions ❌
(primary)
0.7%[0.5%, 0.9%]2
Regressions ❌
(secondary)
0.9%[0.5%, 2.2%]7
Improvements ✅
(primary)
-0.6%[-1.4%, -0.4%]7
Improvements ✅
(secondary)
-1.3%[-2.6%, -0.4%]5
All ❌✅ (primary)-0.4%[-1.4%, 0.9%]9

Binary size

Results (primary 0.1%, secondary 0.1%)

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

meanrangecount
Regressions ❌
(primary)
0.2%[0.0%, 0.5%]80
Regressions ❌
(secondary)
0.3%[0.0%, 0.9%]49
Improvements ✅
(primary)
-0.1%[-0.1%, -0.0%]38
Improvements ✅
(secondary)
-0.1%[-0.1%, -0.0%]51
All ❌✅ (primary)0.1%[-0.1%, 0.5%]118

Bootstrap: 489.577s -> 489.508s (-0.01%)
Artifact size: 390.24 MiB -> 390.20 MiB (-0.01%)

@JonathanBrouwer

Copy link
Copy Markdown
Member

@addiesh@oli-obk
I don't think the perf regression was explicitly acknowledged anywhere.
Is it clear what is causing this regression? Is there anything we can do about it or should we just accept this?

@addiesh

addiesh commented Aug 9, 2026

Copy link
Copy Markdown
Author

I'd lean towards calling it noise or just justified, as nothing immediately stands out to me as "this is causing the regressions." My best bet would be the closure I defined as a helper getting inlined, but I'm not sure. I'd want to hear oli's take on the matter since he has more experience than I do.

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

Labels

A-attributesArea: Attributes (`#[…]`, `#![…]`)A-query-systemArea: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html)A-testsuiteArea: The testsuite used to check the correctness of rustcperf-regressionPerformance regression.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-clippyRelevant to the Clippy team.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.WG-trait-system-refactorThe Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@addiesh@rustbot@rust-log-analyzer@oli-obk@rust-timer@GuillaumeGomez@JonathanBrouwer@jieyouxu