-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doc-tests not compiled ok when setted as no_run
on target x86_64-unknown-linux-musl
#31907
Comments
no_run
on target x86_64-unknown-linux-muslno_run
on target x86_64-unknown-linux-musl
I believe there are two bugs at play here:
Cargo should probably just ignore documentation tests for anything that's not the host platform as you're not really guaranteed to be able to run it anywhere else. |
Yes, Rustdoc should ignore doc tests for cross, IMHO. I think that's probably better than cargo, though it would save time by never invoking Rustdoc On Feb 26, 2016, 12:07 -0500, Alex Crichtonnotifications@github.com, wrote:
|
workaround for rust-lang/rust#31907
don't build/run doctests when target != host fixes rust-lang/rust#31907 r? @alexcrichton
don't build/run doctests when target != host fixes rust-lang/rust#31907 r? @alexcrichton
Why should it ignore doc tests on cross-compile? I have successfully configured the system to run the normal tests on cross-compilation (it would be better if cargo had interpreter support, but Linux binfmt support works for most cases). So shouldn't it be possible to fix building doc tests so they run too? |
workaround for rust-lang/rust#31907
To list usage in documents, add a example in the
lib.rs
documents with markno_run
. It's ok whentarget not setted(it's
x86_64-unknown-linux-gnu
), but failed on targetx86_64-unknown-linux-musl
:I tried this code:
src/lib.rs:
default test is ok:
Test it on target
x86_64-unknown-linux-musl
:Doc-tests should not run as I expected, but it fails as this:
Meta
rustc --version --verbose
:Backtrace:
Result:
The text was updated successfully, but these errors were encountered: