Description
I set targets = ["x86_64-apple-darwin", "x86_64-pc-windows-msvc"]
in order to have docs show for both apple and windows. Both of them are successfully built (I tried locally with docker-compose) but it only shows the docs of x86_64-apple-darwin
. If I switch windows one to be the first, only windows docs shows. Here is what I have in the crate:
#[cfg(all(target_os = "macos", feature = "apple-native"))]
#[doc(cfg(all(target_os = "macos")))]
pub mod macos;
#[cfg(all(target_os = "windows", feature = "windows-native"))]
#[doc(cfg(all(target_os = "windows")))]
pub mod windows;
What I expect intuitively when using targets
is the docs from different build target will be merged. Is there way to config for it? Otherwise, I don't know what is targets
field used for.
I realize there are some tricky issues such as conflicting if I set pub use xxx as default
for one target and pub use yyy as default
for the other. I assume by combine with rust-lang/rust#43781, it is possible to have fine control on what to show in the combined docs after detecting the conflict?