Skip to content

Commit f9f62ff

Browse files
committed
fix target
1 parent 53b1c48 commit f9f62ff

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/cargo/ops/cargo_test.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::ffi::OsString;
22

3-
use crate::core::compiler::{Compilation, Doctest};
3+
use crate::core::compiler::{Compilation, CompileKind, Doctest};
44
use crate::core::shell::Verbosity;
55
use crate::core::Workspace;
66
use crate::ops;
@@ -163,7 +163,9 @@ fn run_doc_tests(
163163
.arg(&target.crate_name());
164164

165165
if doctest_xcompile {
166-
p.arg("--target").arg(&compilation.target);
166+
if let CompileKind::Target(target) = options.compile_opts.build_config.requested_kind {
167+
p.arg("--target").arg(target.rustc_target());
168+
}
167169
p.arg("-Zunstable-options");
168170
p.arg("--enable-per-target-ignores");
169171
}

0 commit comments

Comments
 (0)