about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-01-23 13:07:16 +0000
committerbors <bors@rust-lang.org>2023-01-23 13:07:16 +0000
commitc8e6a9e8b6251bbc8276cb78cabe1998deecbed7 (patch)
treef3fe6240d1392fe749d539d18df606b3b5b719fa /src
parent5bef91c6e902f3bded724713bd2a64ea50abbd25 (diff)
parenteae7f947b5394aabaa9ec104ce9bc7a8633badfc (diff)
downloadrust-c8e6a9e8b6251bbc8276cb78cabe1998deecbed7.tar.gz
rust-c8e6a9e8b6251bbc8276cb78cabe1998deecbed7.zip
Auto merge of #107220 - JohnTitor:rollup-5pvuz0z, r=JohnTitor
Rollup of 7 pull requests

Successful merges:

 - #106796 (BPF: Disable atomic CAS)
 - #106886 (Make stage2 rustdoc and proc-macro-srv disableable in x.py install)
 - #107101 (Filter param-env predicates for errors before calling `to_opt_poly_trait_pred`)
 - #107109 (ThinBox: Add intra-doc-links for Metadata)
 - #107148 (remove error code from `E0789`, add UI test/docs)
 - #107151 (Instantiate dominators algorithm only once)
 - #107153 (Consistently use dominates instead of is_dominated_by)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/dist.rs22
-rw-r--r--src/bootstrap/tool.rs6
-rw-r--r--src/tools/tidy/src/error_codes.rs2
3 files changed, 23 insertions, 7 deletions
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
index 2e4f753965d..2d86ff1d2ba 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -392,19 +392,29 @@ impl Step for Rustc {
             t!(fs::create_dir_all(image.join("bin")));
             builder.cp_r(&src.join("bin"), &image.join("bin"));
 
-            builder.install(&builder.rustdoc(compiler), &image.join("bin"), 0o755);
+            if builder
+                .config
+                .tools
+                .as_ref()
+                .map_or(true, |tools| tools.iter().any(|tool| tool == "rustdoc"))
+            {
+                let rustdoc = builder.rustdoc(compiler);
+                builder.install(&rustdoc, &image.join("bin"), 0o755);
+            }
 
-            let ra_proc_macro_srv = builder
-                .ensure(tool::RustAnalyzerProcMacroSrv {
+            if let Some(ra_proc_macro_srv) = builder.ensure_if_default(
+                tool::RustAnalyzerProcMacroSrv {
                     compiler: builder.compiler_for(
                         compiler.stage,
                         builder.config.build,
                         compiler.host,
                     ),
                     target: compiler.host,
-                })
-                .expect("rust-analyzer-proc-macro-server always builds");
-            builder.install(&ra_proc_macro_srv, &image.join("libexec"), 0o755);
+                },
+                builder.kind,
+            ) {
+                builder.install(&ra_proc_macro_srv, &image.join("libexec"), 0o755);
+            }
 
             let libdir_relative = builder.libdir_relative(compiler);
 
diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
index 9a2100c2fb7..ca5f500f93b 100644
--- a/src/bootstrap/tool.rs
+++ b/src/bootstrap/tool.rs
@@ -765,9 +765,15 @@ impl Step for RustAnalyzerProcMacroSrv {
     const ONLY_HOSTS: bool = true;
 
     fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
+        let builder = run.builder;
         // Allow building `rust-analyzer-proc-macro-srv` both as part of the `rust-analyzer` and as a stand-alone tool.
         run.path("src/tools/rust-analyzer")
             .path("src/tools/rust-analyzer/crates/proc-macro-srv-cli")
+            .default_condition(builder.config.tools.as_ref().map_or(true, |tools| {
+                tools
+                    .iter()
+                    .any(|tool| tool == "rust-analyzer" || tool == "rust-analyzer-proc-macro-srv")
+            }))
     }
 
     fn make_run(run: RunConfig<'_>) {
diff --git a/src/tools/tidy/src/error_codes.rs b/src/tools/tidy/src/error_codes.rs
index 5b84b51a035..6bb4d32f87d 100644
--- a/src/tools/tidy/src/error_codes.rs
+++ b/src/tools/tidy/src/error_codes.rs
@@ -31,7 +31,7 @@ const IGNORE_DOCTEST_CHECK: &[&str] = &["E0464", "E0570", "E0601", "E0602", "E06
 
 // Error codes that don't yet have a UI test. This list will eventually be removed.
 const IGNORE_UI_TEST_CHECK: &[&str] =
-    &["E0461", "E0465", "E0476", "E0514", "E0523", "E0554", "E0640", "E0717", "E0729", "E0789"];
+    &["E0461", "E0465", "E0476", "E0514", "E0523", "E0554", "E0640", "E0717", "E0729"];
 
 macro_rules! verbose_print {
     ($verbose:expr, $($fmt:tt)*) => {