error[E0446]: private type `Foo::Bar` in public interface --> $DIR/E0446.rs:14:5 | LL | / pub fn bar() -> Bar { //~ ERROR E0446 LL | | Bar(0) LL | | } | |_____^ can't leak private type error: aborting due to previous error For more information about this error, try `rustc --explain E0446`.