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

Can't find /src/rust/src after running rust-src #2522

Closed
scuellar opened this issue Oct 15, 2020 · 3 comments
Closed

Can't find /src/rust/src after running rust-src #2522

scuellar opened this issue Oct 15, 2020 · 3 comments
Labels

Comments

@scuellar
Copy link

scuellar commented Oct 15, 2020

Problem
After successfully running rustup component add rust-src the folder [path]/.rustup/toolchains/[my-toolchain]/lib/rustlib/src/rust/src doesn't exist.
From this issue, Im expecting the sources to be put in there but I can't find them.

The context here is that I want to install racer, which expects the source to be there but can't find it.

Steps
I'm following this installation guide step by step using cargo.

After running rustup component add rust-src, first time it succeeds, second time I get
info: component 'rust-src' is up to date
I can even run

% rustup component list | grep rust-src      
rust-src (installed)

However if I run:

% echo `rustc --print sysroot`/lib/rustlib/src/rust/src
[path]/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src
% cd [path]/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src
cd: no such file or directory: [path]/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src
% cd [path]/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust
% ls
Cargo.lock	library

Where did it go?
Possible Solution(s)
Looking back at this issue, could you provide a command to find the folder with the installed source?

Notes

Output of rustup --version: rustup 1.22.1 (b01adbb 2020-07-08)
Output of rustup show:

Default host: x86_64-apple-darwin
rustup home:  /Users/myname/.rustup

installed toolchains
--------------------

stable-x86_64-apple-darwin (default)
nightly-x86_64-apple-darwin

active toolchain
----------------

stable-x86_64-apple-darwin (default)
rustc 1.47.0 (18bf6b4f0 2020-10-07)
@scuellar scuellar added the bug label Oct 15, 2020
@ehuss
Copy link
Contributor

ehuss commented Oct 15, 2020

The directory was renamed to library. Racer was updated in racer-rust/racer#1130 to use the new directory, but it looks like the README was not updated. Perhaps file an issue on the racer repo?

@scuellar
Copy link
Author

scuellar commented Oct 15, 2020

Ah, thank you so much! Unfortunately there is so much outdated info out there I was sure it had to be at src.

Yeah and that fix is not on the most recent release. I'll try to send them a PR.

@kinnison
Copy link
Contributor

Since this is a racer issue, I'm closing it. Thanks @ehuss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants