From 96336e4dd903880cd251cb9ff6689f0ef5f29458 Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Tue, 7 Jun 2022 12:11:49 +1000 Subject: [PATCH] Update doc of `get_target_from_rustc` Signed-off-by: Jiahao XU --- src/target.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/target.rs b/src/target.rs index ad91ffc5..f64175eb 100644 --- a/src/target.rs +++ b/src/target.rs @@ -98,7 +98,8 @@ pub async fn detect_targets() -> Targets { } } -// Figure out what the host target is, from rustc or from this program's own build target +/// Figure out what the host target is using `rustc`. +/// If `rustc` is absent, then it would return `None`. async fn get_target_from_rustc() -> Option> { match Command::new("rustc").arg("-vV").output().await { Ok(Output { status, stdout, .. }) if status.success() => Cursor::new(stdout)