Skip to content

cleanup borrowck, improve c-variadic handling - #160504

Open
lcnr wants to merge 3 commits into
rust-lang:mainfrom
lcnr:borrowck-cleanup
Open

cleanup borrowck, improve c-variadic handling#160504
lcnr wants to merge 3 commits into
rust-lang:mainfrom
lcnr:borrowck-cleanup

Conversation

@lcnr

@lcnr lcnr commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

The first commits of #160491. Hopefully all of them make sense.

It feels intuitive to me that the c-variadic region should be just another late-bound region and tracking region correctly for #160491 is otherwise a mess.

r? types

@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 Aug 4, 2026
@lcnr

lcnr commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 4, 2026
rust-bors Bot pushed a commit that referenced this pull request Aug 4, 2026
cleanup borrowck, improve c-variadic handling
@lcnr
lcnr force-pushed the borrowck-cleanup branch from cb29ba5 to 1860072 Compare August 4, 2026 11:51
@rust-bors

rust-bors Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: e60c57e (e60c57e6c2bc8ac7568f88f5f1643f4560cabba1)
Base parent: c9ff496 (c9ff496891c278ad660bc0ab85c1f0b72059464a)

@rust-timer

This comment has been minimized.

@oli-obk oli-obk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DefiningTy::Const(body_def_id.to_def_id(), args)
}
}
BodyOwnerKind::Const { inline: true } => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commit message could say that inline is already set exactly by checking the above match arm guard

Comment on lines +186 to +188
/// The bound variables for a given defining type. This differs from their usual bound vars
/// in that closures and coroutine closures have an additional `'env`, while C-variadic
/// functions have an additional region for their implicit `VaList` input.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why don't we generally give them those bound vars earlier?

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 4, 2026
@rustbot

rustbot commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (e60c57e): comparison URL.

Overall result: ❌ regressions - no action needed

Benchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up.

@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
Regressions ❌
(secondary)
3.6% [3.6%, 3.6%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 0.6%, secondary -0.7%)

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

mean range count
Regressions ❌
(primary)
4.2% [4.2%, 4.2%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.6% [-0.7%, -0.5%] 3
Improvements ✅
(secondary)
-0.7% [-2.4%, -0.4%] 20
All ❌✅ (primary) 0.6% [-0.7%, 4.2%] 4

Cycles

Results (primary -0.1%, secondary -0.3%)

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

mean range count
Regressions ❌
(primary)
1.5% [0.4%, 4.3%] 6
Regressions ❌
(secondary)
0.7% [0.4%, 1.3%] 6
Improvements ✅
(primary)
-2.7% [-6.9%, -0.6%] 4
Improvements ✅
(secondary)
-1.8% [-3.2%, -0.6%] 4
All ❌✅ (primary) -0.1% [-6.9%, 4.3%] 10

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 489.838s -> 488.617s (-0.25%)
Artifact size: 390.28 MiB -> 390.23 MiB (-0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

4 participants