Uh oh!
There was an error while loading. Please reload this page.
Clean up rustdoc tests by moving them into one place - #76223
Clean up rustdoc tests by moving them into one place#76223GuillaumeGomez wants to merge 1 commit into
Conversation
| mod html_toc; | ||
| #[cfg(test)] | ||
| mod passes_unindent_comments; | ||
| #[cfg(test)] |
There was a problem hiding this comment.
Should we just cfg(test) the parent module instead of duplicating the cfgs?
petrochenkov
commented
Sep 2, 2020
The whole point of Rust unit tests is that they can be placed in modules which they are testing, preventing things that don't need to be public from being public. |
bors
commented
Sep 3, 2020
☔ The latest upstream changes (presumably #73819) made this pull request unmergeable. Please resolve the merge conflicts. |
jyn514
commented
Sep 3, 2020
I agree with petrochenkov here ... this makes a lot of functions public just for testing.
Can you expand on this? What fixtures does rustdoc use for unit tests? |
jyn514
commented
Sep 3, 2020
Also, you linked to the wrong issue in the PR description, I think you meant #76036. |
jyn514
commented
Sep 17, 2020
I'm going to close this since it's not clear it's a useful change. |
Fixes#76035
The idea behind this move is to have tests in one place. It became very important for me because we started to have fixtures, making the code "more messy" than it should in my opinion. Like this, all tests are in one place and they're not mixed with the code anymore.
r? @jyn514
I think it'll also interest @ollie27 so pinging them!