Skip to content

rustc_save_analysis: get_expr_data returns None #58614

Closed as not planned
Closed as not planned

Description

@chifflier

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

Activity

  1. added
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    A-save-analysisArea: saving results of analyses such as inference and borrowck results to a file.
    on Feb 26, 2019
  2. jyn514 commented on Feb 19, 2023

    @jyn514
    Member

    Save-analysis has been removed from the compiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-save-analysisArea: saving results of analyses such as inference and borrowck results to a file.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions