Skip to content

Instantly share code, notes, and snippets.

@dearmark
Created January 21, 2017 08:34
Show Gist options
  • Select an option

  • Save dearmark/90a7da8904111466b8b2c47d1678485b to your computer and use it in GitHub Desktop.

Select an option

Save dearmark/90a7da8904111466b8b2c47d1678485b to your computer and use it in GitHub Desktop.
rustup component add rust-src
export RUST_SRC_PATH="$(rustc --print sysroot)/lib/rustlib/src/rust/src"
@xuesongbj

Copy link
Copy Markdown

πŸš€πŸš€πŸš€πŸš€πŸš€πŸš€

@BobDu

BobDu commented Jan 22, 2024

Copy link
Copy Markdown

Incredible, 8 years have passed and it still works as well as ever. πŸš€πŸš€πŸš€πŸš€

@ryanmcgrath

Copy link
Copy Markdown

A friendly heads up that if you stumble on this while debugging your issues, you probably want to hardcode the path to rustc.

e.g, MacPorts for me has it installed for whatever dependency reason and it was taking precedence without me realizing, leading to various LSP errors. I assume similar is possible with Homebrew, and that you can reorder whatever paths in your ENV to fix it properly... but I don't care enough to dig for it lol

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