Skip to content

Adding rustc_private = true to Global Cargo.toml to Allow Parsing in Some lsp-based IDE/editor Backends #428

Closed
@tempdragon

Description

@tempdragon

I noticed that on Emacs, the rustc_codegen_gcc along with some other rustc-related libraries/projects can be correctly parsed with the following lines added to Cargo.toml,

[package.metadata.rust-analyzer]
rustc_private = true

according to rust-analyzer manual (Search for "rustc_private" if you can't see it directly.).

Otherwise, the rust-analyzer will fail to parse with unresolved external crate for rustc-related crates.

Since there is probably other methods to allow the correct analysis in your IDE without this line, could you please give me some hints about how to have them parse the gcc backend correctly if you choose not to add these lines?

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions