Skip to content

Add some crates sources to "rust-src" distribution. #58268

Closed
@taeguk

Description

@taeguk
Contributor

In IntelliJ-Rust and rls-vscode, rust-src component is used to acquire standard crates sources.
But, in currently, librustc, librustc_plugin, and libsyntax are emitted in the list below.

let std_src_dirs = [

So, syntax highlighting and code completion are not working when using those crates in IntelliJ-Rust or rls-vscode.

There was similar issue #55279 about libproc_macro and it was fixed in #55280.
How about adding those crates (librustc, librustc_plugin, and libsyntax) to the list above, too?

Related issue: intellij-rust/intellij-rust#2623

Activity

ishitatsuyuki

ishitatsuyuki commented on Feb 11, 2019

@ishitatsuyuki
Contributor

Related: #42667

added a commit that references this issue on Mar 8, 2019

Rollup merge of rust-lang#58269 - taeguk:add-some-sources-to-rust-src…

bf7b502
eddyb

eddyb commented on Mar 2, 2020

@eddyb
Member

Is this still a concern? I don't think the current set of crates (librustc and librustc_ast) are enough to cover plugin dependencies anymore but I don't think we've heard back from anyone about it.

IMO the solution used here (to add compiler crates to rust-src) is not ideal, and we should probably have any compiler sources available through a different rustup component, if we actually need them.

For now we should probably just remove librustc and librustc_ast from the list.

cc @Mark-Simulacrum

RalfJung

RalfJung commented on Mar 2, 2020

@RalfJung
Member

Also see #69631

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @eddyb@RalfJung@taeguk@ishitatsuyuki

        Issue actions

          Add some crates sources to "rust-src" distribution. · Issue #58268 · rust-lang/rust