When to name a mod starting with 2 underscore?

code from crate syn

// Not public API.
#[doc(hidden)]
#[path = "export.rs"]
pub mod __private;

This 4-line-code yells 3 times that it's a private internal module anyone outside should not rely on it. Because technically they can since it's pub mod which is necessary for macros in public API. Double underscore is the 4th yelling. If you want to yell more, put more underscores.

8 Likes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.