-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
rust-analyzer can't get data on rustc internals #3517
Comments
I think |
The |
[dependencies]
rustc_lint = { path = "/home/matthias/vcs/github/rust/src/librustc_lint"} makes it work indeed! 👍 |
This crate takes am absolute path to a rustc repo and adds path-dependencies that point towards the respective rustc subcrates into the Cargo.tomls of the clippy and clippy_lints crate. This allows rustc-analyzer to show proper type annotations etc on rustc-internals inside the clippy repo. cc rust-lang/rust-analyzer#3517 cc rust-lang#5514
This crate takes an absolute path to a rustc repo and adds path-dependencies that point towards the respective rustc subcrates into the Cargo.tomls of the clippy and clippy_lints crate. This allows rustc-analyzer to show proper type annotations etc on rustc-internals inside the clippy repo. Usage: ./souce_injector/target/debug/souce_injector /absolute/path/to/rust/ cc rust-lang/rust-analyzer#3517 cc rust-lang#5514
This crate takes an absolute path to a rustc repo and adds path-dependencies that point towards the respective rustc subcrates into the Cargo.tomls of the clippy and clippy_lints crate. This allows rustc-analyzer to show proper type annotations etc on rustc-internals inside the clippy repo. Usage: ./source_injector/target/debug/souce_injector /absolute/path/to/rust/ cc rust-lang/rust-analyzer#3517 cc rust-lang#5514
This takes an absolute path to a rustc repo and adds path-dependencies that point towards the respective rustc subcrates into the Cargo.tomls of the clippy and clippy_lints crate. This allows rustc-analyzer to show proper type annotations etc on rustc-internals inside the clippy repo. Usage: cargo dev ra-setup /absolute/path/to/rust/ cc rust-lang/rust-analyzer#3517 cc rust-lang#5514
This takes an absolute path to a rustc repo and adds path-dependencies that point towards the respective rustc subcrates into the Cargo.tomls of the clippy and clippy_lints crate. This allows rustc-analyzer to show proper type annotations etc on rustc-internals inside the clippy repo. Usage: cargo dev ra-setup /absolute/path/to/rust/ cc rust-lang/rust-analyzer#3517 cc rust-lang#5514
This takes an absolute path to a rustc repo and adds path-dependencies that point towards the respective rustc subcrates into the Cargo.tomls of the clippy and clippy_lints crate. This allows rustc-analyzer to show proper type annotations etc on rustc-internals inside the clippy repo. Usage: cargo dev ra-setup /absolute/path/to/rust/ cc rust-lang/rust-analyzer#3517 cc rust-lang#5514
cargo_dev: add ra_setup It takes an absolute path to a rustc repo and adds path-dependencies that point towards the respective rustc subcrates into the Cargo.tomls of the clippy and clippy_lints crate. This allows rustc-analyzer to show proper type annotations etc on rustc-internals inside the clippy repo. Usage: cargo dev ra-setup /absolute/path/to/rust/ cc rust-lang/rust-analyzer#3517 cc #5514 changelog: none
cargo_dev: add ra-setup It takes an absolute path to a rustc repo and adds path-dependencies that point towards the respective rustc subcrates into the Cargo.tomls of the clippy and clippy_lints crate. This allows rustc-analyzer to show proper type annotations etc on rustc-internals inside the clippy repo. Usage: cargo dev ra-setup /absolute/path/to/rust/ cc rust-lang/rust-analyzer#3517 cc #5514 changelog: none
After rust-lang/rust#76856, this could be done with implementing https://github.com/rust-analyzer/rust-analyzer/blob/96e988fcc3be11acc89dc2c1957bc14e8f39c911/crates/project_model/src/sysroot.rs#L108 for |
If the configured rustcSource was not set, then try to automatically detect a source for the sysroot rustc directory.
If the configured rustcSource was not set, then try to automatically detect a source for the sysroot rustc directory.
7643: Automatically detect the rustc-src directory (fixes #3517) r=matklad a=bnjbvr If the configured rustcSource was not set, then try to automatically detect a source for the sysroot rustc directory. I wasn't sure how to do it in the case of the project.json file, though. 7663: Tolerate spaces in nix binary patching r=matklad a=CertainLach If path to original file contains space (I.e on code insiders, where default data directory is ~/Code - Insiders/), then there is syntax error evaluating src arg. Instead pass path as str, and coerce to path back in nix expression Co-authored-by: Benjamin Bouvier <[email protected]> Co-authored-by: Yaroslav Bolyukin <[email protected]>
When using rust-analyzer on clippy for example, it seems to fail to get a lot of info on functions/types that come from rustc, for example:
Hovering
rustc_lint::LintStore
did not provide any type information.I tried the same with the clippy submodule inside the rustc-repo hoping that could solve it but to no avail.
The text was updated successfully, but these errors were encountered: