tokio-rs / tokio

A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...
https://tokio.rs
MIT License
25.71k stars 2.35k forks source link

docs: fix docsrs builds with the fs feature enabled #6585

Closed udoprog closed 1 month ago

udoprog commented 1 month ago

If you enable --cfg docsrs with the fs feature but without the net feature, tokio docs doesn't docbuild.

The docs::os module need to be defined if the fs feature is enabled since it's used here.

I genuinely have no idea if this interferes with #6166 or any of those related issues. Some tests would be nice, but I'm not sure if we want to set them up. Testing feature combinations for the sole benefit of dependent docsrs builds seems awkward. We might just prefer having these always being exported with #[allow(unused)] to avoid future regressions.