diff --git a/src/cli/rustup_mode.rs b/src/cli/rustup_mode.rs index e7682d1be1..9068a102d9 100644 --- a/src/cli/rustup_mode.rs +++ b/src/cli/rustup_mode.rs @@ -1598,9 +1598,14 @@ fn doc(cfg: &Cfg, m: &ArgMatches) -> Result { let doc_url = if let Some(topic) = m.get_one::("topic") { topical_path = topical_doc::local_path(&toolchain.doc_path("").unwrap(), topic)?; topical_path.to_str().unwrap() - } else if let Some((_, _, path)) = DOCS_DATA.iter().find(|(name, _, _)| m.get_flag(name)) { + } else if let Some((name, _, path)) = DOCS_DATA.iter().find(|(name, _, _)| m.get_flag(name)) { + writeln!( + process().stderr().lock(), + "Opening docs named `{name}` in your browser" + )?; path } else { + writeln!(process().stderr().lock(), "Opening docs in your browser")?; "index.html" };