Skip to content

Commit c0f2ee0

Browse files
committed
fix(compiler): Link people to more info about profiles
1 parent e7e8d87 commit c0f2ee0

File tree

1 file changed

+9
-2
lines changed
  • src/cargo/core/compiler/job_queue

1 file changed

+9
-2
lines changed

src/cargo/core/compiler/job_queue/mod.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -806,8 +806,15 @@ impl<'cfg> DrainState<'cfg> {
806806
// `display_error` inside `handle_error`.
807807
Some(anyhow::Error::new(AlreadyPrintedError::new(error)))
808808
} else if self.queue.is_empty() && self.pending_queue.is_empty() {
809-
let message =
810-
format!("`{profile_name}` profile [{opt_type}] target(s) in {time_elapsed}",);
809+
let profile_link =
810+
cx.bcx.config.shell().err_hyperlink(
811+
"https://doc.rust-lang.org/cargo/reference/profiles.html#profiles",
812+
);
813+
let message = format!(
814+
"{}`{profile_name}` profile [{opt_type}]{} target(s) in {time_elapsed}",
815+
profile_link.open(),
816+
profile_link.close()
817+
);
811818
if !cx.bcx.build_config.build_plan {
812819
// It doesn't really matter if this fails.
813820
let _ = cx.bcx.config.shell().status("Finished", message);

0 commit comments

Comments
 (0)