rustc_save_analysis: get_expr_data returns None #58614
Labels
A-save-analysis
Area: saving results of analyses such as inference and borrowck results to a file.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I am currently trying to port https://github.com/nrc/callgraph.rs/ to the current nightly and updated it for the changes on rustc_private and rustc_save_analysis. The goal is to parse the saved analysis to extract a call graph.
The saved anaysis seems to work, function calls are detected correctly. However, my code does not work on method calls (like
Foo::m1()
orfoo.m2()
, because neitherSaveContext::get_expr_data
norSaveContext::get_path_data
returns some data on the nodes when iterating the AST and requesting analysis data.What is the correct way of getting analysis data for method calls ? Did I miss something on the analysis ?
The code is here https://github.com/chifflier/callgraph.rs (the visitor code is here: https://github.com/chifflier/callgraph.rs/blob/master/src/visitor.rs) and I am testing using
cargo run examples/methods.rs
The text was updated successfully, but these errors were encountered: