I see your point, but on the other hand this behaviour is error prone for crate authors.
I think that it is easy to re-export internal functions and forgetting to do the same for some kind of struct. Maybe it is incorrect to consider this something unwanted, but at the same time it is also difficult to help a developer who doesn’t want this situation.
To me, it is difficult to think about a type that I can get as output but I cannot even mention because “it’s private”. IMHO, if a struct is private, it shall not be exposed in any way.
But the fact that
pub use allows to expose to
super module a function returning structs that are not accessible from
super is some sort of privateness inconsistency IMO.