Skip to content
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

core doc-tests don't run #62218

Closed
cuviper opened this issue Jun 28, 2019 · 4 comments
Closed

core doc-tests don't run #62218

cuviper opened this issue Jun 28, 2019 · 4 comments
Labels
A-doctests Area: Documentation tests, run by rustdoc C-bug Category: This is a bug. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@cuviper
Copy link
Member

cuviper commented Jun 28, 2019

I'm adding something to Iterator, and I wanted to try my examples, but I can't seem to get any doc tests to run for core.

$ ./x.py test --doc libcore
[...]
Building rustdoc for stage1 (x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 0.07s
Testing core stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 0.07s
   Doc-tests core

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

Same for ./x.py test --doc src/libcore.

If I remove the --doc parameter, it does run unit tests, but still 0 doc tests.

I'm suspicious of this comment:

rust/src/libcore/lib.rs

Lines 50 to 51 in 3849a5f

// This cfg won't affect doc tests.
#![cfg(not(test))]

@cuviper
Copy link
Member Author

cuviper commented Jun 28, 2019

I guess #62213 and #61199 are meant to address this?

@cuviper cuviper added A-doctests Area: Documentation tests, run by rustdoc C-bug Category: This is a bug. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jun 28, 2019
@jonas-schievink
Copy link
Contributor

I guess #62213 and #61199 are meant to address this?

Correct

@QuietMisdreavus
Copy link
Member

Now that #61199 has landed, this should be fixed.

@ollie27
Copy link
Member

ollie27 commented Jul 1, 2019

Yeah, I've checked the recent build logs on azure and the core doctests are now being run.

@ollie27 ollie27 closed this as completed Jul 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-doctests Area: Documentation tests, run by rustdoc C-bug Category: This is a bug. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants