Skip to content

Impl: borrow check flow state and NLL updates - #359

Draft
pranavpurankar wants to merge 1 commit into
rust-lang:mainfrom
pranavpurankar:impl-init-and-move-brwck-296
Draft

Impl: borrow check flow state and NLL updates#359
pranavpurankar wants to merge 1 commit into
rust-lang:mainfrom
pranavpurankar:impl-init-and-move-brwck-296

Conversation

@pranavpurankar

@pranavpurankar pranavpurankar commented May 12, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

It adds the necessary state to flow_state.rs to record which variables are "turned on" and introduces initial checks in nll.rs to catch use-of-uninitialized errors.

related to #296

How does it work, what questions do you have?

The implementation adds a set to the flow state to track initialized places. It marks function arguments as initialized at the start to prevent breaking existing tests and then checks this set whenever a variable is read (not sure but regression).

To be honest, I am stopping here and submitting this surface level solution (for use_of_initialized_variable) just to save my progress. I’ve realized that I’m relying on AI for 95-97% of the logic, and I don't feel like I truly understand the internals yet. I’m a bit old school and dont want to submit code I dont fully grasp. Im going to spend the next 25-30 days purely on learning the project so I can contribute properly later.

AI disclosure

AI augmentation -> 95%

Question:

Does this approach even aligning with liveness (apch2) logic that we discussed on zulip?

@rustbot

rustbot commented May 15, 2026

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (possibly #362) made this pull request unmergeable. Please resolve the merge conflicts.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants