Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #5882 - dima74:ra_setup-prevent-compile-rustc, r=Manish…
…earth Prevent compile parts of rustc when using `cargo dev ra-setup` Currently after running `cargo dev ra-setup` the following lines are added to `Cargo.toml`: ```toml [target] rustc_data_structures = { path = ".../rust/src/librustc_data_structures" } rustc_driver = { path = ".../rust/src/librustc_driver" } rustc_errors = { path = ".../rust/src/librustc_errors" } rustc_interface = { path = ".../rust/src/librustc_interface" } rustc_middle = { path = ".../rust/src/librustc_middle" } ``` This pull request adds dependencies for `rustc` crates under `cfg(NOT_A_PLATFORM)`, thus preventing them from compiling together with clippy: ```toml [target.'cfg(NOT_A_PLATFORM)'.dependencies] rustc_data_structures = { path = ".../rust/src/librustc_data_structures" } rustc_driver = { path = ".../rust/src/librustc_driver" } rustc_errors = { path = ".../rust/src/librustc_errors" } rustc_interface = { path = ".../rust/src/librustc_interface" } rustc_middle = { path = ".../rust/src/librustc_middle" } ``` --- This approach was [originally proposed for IntelliJ Rust](intellij-rust/intellij-rust#1618 (comment)), and looks like it works for rust-analyzer too. changelog: none
- Loading branch information