diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-08-27 09:45:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-27 09:45:19 +0200 |
| commit | ab1123b697d1cc0a6ffea2c85c619582af65375a (patch) | |
| tree | d674a5f7cbd92160993bdff360c5bc9e4b962318 | |
| parent | fd5a8e12619f6327f09fcce2bef0d5a59639ca58 (diff) | |
| parent | 76c2316ff30795e00a3758ed577daaf3bf9f2354 (diff) | |
| download | rust-ab1123b697d1cc0a6ffea2c85c619582af65375a.tar.gz rust-ab1123b697d1cc0a6ffea2c85c619582af65375a.zip | |
Rollup merge of #115111 - ozkanonur:check-rust-analyzer-if-enabled, r=Mark-Simulacrum
compile rust-anaylzer with `x check` if it's enabled By default, `x check` doesn't compile the rust-analyzer. But when it's enabled in the config's tools section, there's no reason not to do it. This change allows `x check` to compile rust-analyzer if it's enabled in config's tools section. Helps to #115031
| -rw-r--r-- | src/bootstrap/check.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs index bdefc41c9c7..b417abc00f5 100644 --- a/src/bootstrap/check.rs +++ b/src/bootstrap/check.rs @@ -353,10 +353,17 @@ pub struct RustAnalyzer { impl Step for RustAnalyzer { type Output = (); const ONLY_HOSTS: bool = true; - const DEFAULT: bool = false; + const DEFAULT: bool = true; fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { - run.path("src/tools/rust-analyzer") + let builder = run.builder; + run.path("src/tools/rust-analyzer").default_condition( + builder + .config + .tools + .as_ref() + .map_or(true, |tools| tools.iter().any(|tool| tool == "rust-analyzer")), + ) } fn make_run(run: RunConfig<'_>) { |
