You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Rust: an in-file call binds to any same-named function, so Matcher::new() reaches Printer::new() and Arc::new(x) reaches the file's own new #4237
I have checked the Troubleshooting section in the README
What happened?
extract_rust binds a call inside one file by the callee's bare name alone (label_to_nid.get(callee_name) in walk_calls, graphify/extractors/rust.py). The index holds every node in the file, last one wins, and the call's shape is ignored:
Matcher::new() goes to whichever fn new the file defines last, even impl Printer's.
Arc::new(x), Vec::default(), String::from(..) (std types) go to the file's own new / default / from.
self.go() goes to another type's go when both types live in the file.
drop(x) (a free call) goes to impl Drop's method; x.total() (a method call) goes to a free fn total.
All these edges are calls, EXTRACTED, confidence 1.0.
Measured against rust-analyzer (go-to-definition at every call inside every fn), 0.9.80, calls edges whose both ends are in .rs files:
No LLM keys; AST only. Clean checkout of v8 @ 6478eb7 reproduces.
Additional context
The call already says which type it means (Matcher::, Self::, self. inside impl Matcher), and the extractor knows each method's impl type, so the in-file match can be restricted to that type's methods. Related but different: #2313 (the shared builtin-name list), #2774 (node ids merged by bare name), #2135 (lowercase module::f() across files). PR right after this issue.
Activity
github-actions commentedon Oct 8, 2026
Thanks for opening this issue, @rohit-jsfreaky. A maintainer will take a look soon.
If you would like to discuss it in real time, come say hi on our Discord server. For longer-form questions and ideas there is also GitHub Discussions.
To help us triage, please make sure the report includes what you expected, what actually happened, and the steps (and a small sample) to reproduce it.
safishamsi commentedon Oct 9, 2026
Fixed by #4238 (thanks @rohit-jsfreaky), shipped in v0.9.82. Closing as resolved.