error[E0624]: method `foo` is private --> $DIR/private-impl-method.rs:20:7 | LL | s.foo(); | ^^^ error: aborting due to previous error For more information about this error, try `rustc --explain E0624`.