Skip to content

Refactor LivenessResults into LivenessComputation, without typeck - #162913

Open
jackh726 wants to merge 2 commits into
rust-lang:mainfrom
jackh726:trace-refactor
Open

jackh726 wants to merge 2 commits into
rust-lang:mainfrom
jackh726:trace-refactor

Conversation

@jackh726

Copy link
Copy Markdown
Member

This refactor enables splitting out some liveness calculation to be deferred.

r? lqd

@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 Sep 17, 2026
@jackh726

Copy link
Copy Markdown
Member Author

Disclosure: An LLM was used for experiments here, but all code here is written fresh.

@rust-bors

This comment has been minimized.

@rust-cloud-vms
rust-cloud-vms Bot force-pushed the trace-refactor branch 2 times, most recently from a7b130c to 33a9201 Compare September 17, 2026 23:05
@jackh726 jackh726 changed the title Refactor LivenessResults into LivenessCalculation, without typeck Refactor LivenessResults into LivenessComputation, without typeck Sep 17, 2026

@lqd lqd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

awesome, a few comments

View changes since this review

stack: Vec<PointIndex>,
}

struct DropData<'tcx> {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Apologies in advance for being annoying: the borrowck crate has a lot of entangled and undocumented stuff, and IMO a practical way to fix it is for every change to leave things in a slightly better state. Add missing documentation, fix comments, simplify and clarify code when we can, etc.

This absence is pre-existing, but let's document DropData now.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added a comment - let me know if that works for you.

Comment thread compiler/rustc_borrowck/src/type_check/liveness/trace.rs Outdated
Comment thread compiler/rustc_borrowck/src/type_check/liveness/trace.rs Outdated
Comment thread compiler/rustc_borrowck/src/type_check/liveness/trace.rs Outdated
Comment thread compiler/rustc_borrowck/src/type_check/liveness/trace.rs Outdated
Comment thread compiler/rustc_borrowck/src/type_check/liveness/trace.rs Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants