Add a note about doctest xcompile.

This commit is contained in:
Eric Huss 2021-11-28 17:02:06 -08:00
parent 8032ac5ef0
commit ca3356a25c
2 changed files with 18 additions and 0 deletions

View file

@ -173,6 +173,16 @@ fn run_doc_tests(
CompileKind::Target(target) => {
if target.short_name() != compilation.host {
// Skip doctests, -Zdoctest-xcompile not enabled.
config.shell().verbose(|shell| {
shell.note(format!(
"skipping doctests for {} ({}), \
cross-compilation doctests are not yet supported\n\
See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#doctest-xcompile \
for more information.",
unit.pkg,
unit.target.description_named()
))
})?;
continue;
}
}

View file

@ -617,6 +617,10 @@ fn no_cross_doctests() {
[COMPILING] foo v0.0.1 ([CWD])
[RUNNING] `rustc --crate-name foo [..]
[FINISHED] test [unoptimized + debuginfo] target(s) in [..]
[NOTE] skipping doctests for foo v0.0.1 ([ROOT]/foo) (lib), \
cross-compilation doctests are not yet supported
See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#doctest-xcompile \
for more information.
",
)
.run();
@ -634,6 +638,10 @@ fn no_cross_doctests() {
[RUNNING] `rustc --crate-name foo [..]--test[..]
[FINISHED] test [unoptimized + debuginfo] target(s) in [..]
[RUNNING] `[CWD]/target/{triple}/debug/deps/foo-[..][EXE]`
[NOTE] skipping doctests for foo v0.0.1 ([ROOT]/foo) (lib), \
cross-compilation doctests are not yet supported
See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#doctest-xcompile \
for more information.
",
triple = target
))