Skip to content

Commit

Permalink
fix(compiler): Link people to more info about profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Feb 8, 2024
1 parent 26d4e66 commit f03c55e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/cargo/core/compiler/job_queue/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f03c55e

Please sign in to comment.