Repository navigation
feat(analysis): name bounded Rust value propagation limits #3271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
2e7a9d5
feat(analysis): name bounded Rust value propagation limits
EffortlessSteven 682a922
fix(rust-analysis): bound value propagation identity
EffortlessSteven 0fee42d
test(rust-analysis): qualify helper references
EffortlessSteven 29ec940
docs(spec): complete value propagation contract
EffortlessSteven d7018b1
docs(spec): normalize required heading case
EffortlessSteven 7838fa1
docs(traceability): map value propagation spec
EffortlessSteven b5f99d1
docs(schema): list value propagation limit
EffortlessSteven b36bc70
fix(rust-analysis): reject ambiguous equality shapes
EffortlessSteven 17c794c
fix(rust-analysis): bind equality operand precisely
EffortlessSteven File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
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
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
46 changes: 46 additions & 0 deletions
46
docs/specs/RIPR-SPEC-0150-rust-value-propagation-limitation.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| # RIPR-SPEC-0150: Rust bounded value-propagation limitation | ||
|
|
||
| Status: accepted | ||
|
|
||
| Issue: #3215 | ||
|
|
||
| ## Contract | ||
|
|
||
| When a changed Rust `let` binding has a right-hand side containing `map_or` | ||
| and one of the bounded operation families `find`, `rfind`, or `len_utf8`, and | ||
| the same owner function later compares that binding in an equality predicate, | ||
| RIPR may emit: | ||
|
|
||
| ```text | ||
| static_limit_kind: rust_value_propagation_unresolved | ||
| class: static_unknown | ||
| ``` | ||
|
|
||
| The finding must retain related tests when they are already discovered. It | ||
| must disclose the last established binding, the first unresolved edge into | ||
| the equality predicate, the analyzer route | ||
| `analysis/rust-value-propagation`, and a limitation-only non-claim. | ||
|
|
||
| ## Required guards | ||
|
|
||
| - the changed line must parse as a simple `let` binding; | ||
| - the operation-family and `map_or` checks apply to the changed right-hand | ||
| side, not arbitrary owner text; | ||
| - the compared identifier must be a whole identifier in the same owner body; | ||
| - a missing owner or missing related tests produces no new limitation; | ||
| - unrelated helper, loop, dynamic, and non-equality shapes remain unchanged; | ||
| - classification is never promoted and no repair packet or verify command is | ||
| synthesized. | ||
|
|
||
| ## Proof | ||
|
|
||
| The production-path Rust adapter fixture covers the `rfind`/`map_or` binding | ||
| feeding an equality predicate with two exact related tests. Negative controls | ||
| cover a non-family `len` binding and must not receive this limitation. The | ||
| stable enum wire string and LSP accepted-kind catalog are tested separately. | ||
|
|
||
| ## Non-goals | ||
|
|
||
| This slice does not resolve value propagation, prove the equality boundary, | ||
| change probe-family inference, execute mutations, calculate rates, or create | ||
| repair/test instructions. Those are later bounded slices of #3215. |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.