-
Notifications
You must be signed in to change notification settings - Fork 1
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
Recursive reexported module should stop when the inner module duplicates as ancestor module #3
Comments
├── [Mod] actix::prelude
│ ... (non-module items omitted under prelude module)
│ ├─➤ [Mod] actors
│ ├── [Mod] dev
│ ... (non-module items omitted under dev module)
│ │ ├─➤ [Mod] actix::dev::channel
│ │ └── [Mod] prelude
│ │ ├─➤ [Mod] actors
│ │ ├─➤ [Mod] fut
│ │ ╰─➤ [Mod] io
│ ├─➤ [Mod] fut
│ ╰─➤ [Mod] io vs HTML version //Module actix::prelude
pub use crate::actors;
pub use crate::dev;
pub use crate::fut;
pub use crate::io;
//Module actix::dev
pub use crate::prelude::*;
pub mod channel { ... } |
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a follow-up to #2 .
Background
actix contains infinite recursive modules:
The HTML rendering version show them as the source code does:
But the rendering is imperfect as tree view because a complete tree always is cached as known lines.
Even though the syntax of
use actix::prelude::dev::prelude
is acceptable in Rust and for human, it's definitely not encouraged to use. (Well, it might serve as an odd macro trick.)So to solve the problem of stack overflows, there are several ways:
futures
crate is an example for this: it's a highly reexporting crate. Doing so means only two empty modules are shownactix::prelude::dev::prelude
line with extra information that say the path exists and is usable. But the reason to not have it prevails: not encouraged to use for coding, much less important to know for users and simpler code for term-rustdoc.The text was updated successfully, but these errors were encountered: