Skip to content
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

rustc_save_analysis: get_expr_data returns None #58614

Closed
chifflier opened this issue Feb 21, 2019 · 1 comment
Closed

rustc_save_analysis: get_expr_data returns None #58614

chifflier opened this issue Feb 21, 2019 · 1 comment
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.

Comments

@chifflier
Copy link

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() or foo.m2(), because neither SaveContext::get_expr_data nor SaveContext::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

@jonas-schievink jonas-schievink added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-save-analysis Area: saving results of analyses such as inference and borrowck results to a file. labels Feb 26, 2019
@jyn514
Copy link
Member

jyn514 commented Feb 19, 2023

Save-analysis has been removed from the compiler.

@jyn514 jyn514 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

3 participants