Impl: borrow check flow state and NLL updates - #359
Draft
pranavpurankar wants to merge 1 commit into
Draft
Conversation
Collaborator
|
☔ The latest upstream changes (possibly #362) made this pull request unmergeable. Please resolve the merge conflicts. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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?