1
0
Fork 0
mirror of https://github.com/imjasonh/rustvulncheck synced 2026-07-08 04:08:07 +00:00
Commit graph

2 commits

Author SHA1 Message Date
Claude
7385e81c56
Fix duplicate symbols and trait-name-as-type bugs in diff_analyzer
Bug 4 - Duplicate symbols (~43 entries, 195 extra): When a fn signature
was both deleted and added (modified), each line independently produced
a symbol. Added dedup to the fn-declaration path that upgrades existing
entries to Modified instead of adding duplicates.

Bug 5 - Trait name as type (~146 symbols): Truncated hunk headers like
`impl From<X>` (without `for ActualType`) caused the trait name to be
captured as the implementing type, producing wrong symbols like
`From::from`. Added is_std_trait() blocklist to return None for
well-known traits when `for` is absent, falling through to the safer
`<method>` placeholder.

Added 4 regression tests. All 51 tests pass.

https://claude.ai/code/session_01P1LKP6aqGt68rQAXrF6kSE
2026-03-25 15:35:49 +00:00
Claude
873be4d133
Fix three symbol extraction bugs and add lessons.md
1. Fix `for` keyword leaking into symbol names (~14 entries): replaced
   greedy regex `<.*>` with bracket-counting parser `parse_impl_type()`
   that correctly handles nested generics like `impl<T> From<Py<T>> for PyObject`.

2. Fix `where` clause leaking into symbol names (~5 entries): the new
   parser stops at top-level `where` keywords.

3. Filter test functions from symbol extraction (~39 entries): skip
   `#[test]`/`#[cfg(test)]` attributed functions and `test_*` named
   functions in diff output.

Added 9 regression tests. All 47 tests pass.

https://claude.ai/code/session_01P1LKP6aqGt68rQAXrF6kSE
2026-03-25 15:11:28 +00:00