From f06e88d9be36ed0f83ada1af225e66f4e5757735 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 8 Feb 2024 14:00:36 -0600 Subject: [PATCH] fix(compiler): Link people to more info about profiles --- src/cargo/core/compiler/job_queue/mod.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/cargo/core/compiler/job_queue/mod.rs b/src/cargo/core/compiler/job_queue/mod.rs index 1a736339a95e..47c45f1cbf90 100644 --- a/src/cargo/core/compiler/job_queue/mod.rs +++ b/src/cargo/core/compiler/job_queue/mod.rs @@ -806,8 +806,15 @@ impl<'cfg> DrainState<'cfg> { // `display_error` inside `handle_error`. Some(anyhow::Error::new(AlreadyPrintedError::new(error))) } else if self.queue.is_empty() && self.pending_queue.is_empty() { - let message = - format!("`{profile_name}` profile [{opt_type}] target(s) in {time_elapsed}",); + let profile_link = + cx.bcx.config.shell().err_hyperlink( + "https://doc.rust-lang.org/cargo/reference/profiles.html#profiles", + ); + let message = format!( + "{}`{profile_name}` profile{} [{opt_type}] target(s) in {time_elapsed}", + profile_link.open(), + profile_link.close() + ); if !cx.bcx.build_config.build_plan { // It doesn't really matter if this fails. let _ = cx.bcx.config.shell().status("Finished", message);