Skip to content

"Inherent" "impls" save-analysis have empty "value" #60872

Closed as not planned
Closed as not planned

Description

@asutherland

For a rust impl block like impl Loader {...}, the current nightly toolchain generates an impls entry that has a span that references the position of "Loader" in the source file, but the value is the empty string "".

As a particular example, https://github.com/mozsearch/mozsearch/blob/7b87459eea1c0a24beb362b7627960260185034b/tests/tests/files/simple.rs#L36 produces the following prettified impls item:

        {
            "span": {
                "byte_start": 748,
                "column_end": 12,
                "column_start": 6,
                "byte_end": 754,
                "line_end": 36,
                "file_name": "simple.rs",
                "line_start": 36
            },
            "parent": null,
            "kind": "Inherent",
            "children": [
                {
                    "index": 27,
                    "krate": 0
                },
                {
                    "index": 28,
                    "krate": 0
                },
                {
                    "index": 29,
                    "krate": 0
                },
                {
                    "index": 30,
                    "krate": 0
                },
                {
                    "index": 31,
                    "krate": 0
                }
            ],
            "value": "",
            "attributes": [],
            "sig": null,
            "id": 1,
            "docs": ""
        }

The context in which I'm concerned about this is for https://github.com/mozsearch/mozsearch. The rust language indexer uses rls to load the analysis data and processes it at a low level. I've hacked around the issue by extracting the contents of the span manually, but it seems useful to include the value.

Suggested label:A-save-analysis

Activity

  1. added
    A-save-analysisArea: saving results of analyses such as inference and borrowck results to a file.
    T-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.
    on May 16, 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-dev-toolsRelevant to the dev-tools subteam, 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