Update doc of get_target_from_rustc

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2022-06-07 12:11:49 +10:00
parent 95b7c4f771
commit 96336e4dd9
No known key found for this signature in database
GPG key ID: 591C0B03040416D6

View file

@ -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<Box<str>> {
match Command::new("rustc").arg("-vV").output().await {
Ok(Output { status, stdout, .. }) if status.success() => Cursor::new(stdout)