error[E0446]: crate-visible type `Snail` in public interface --> $DIR/issue-33174-restricted-type-in-public-interface.rs:28:1 | LL | pub(crate) struct Snail; | ---------- `Snail` declared as crate-visible ... LL | pub type Helix_pomatia = Shell; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak crate-visible type error[E0446]: restricted type `sea::Turtle` in public interface --> $DIR/issue-33174-restricted-type-in-public-interface.rs:31:1 | LL | pub(super) struct Turtle; | ---------- `sea::Turtle` declared as restricted ... LL | pub type Dermochelys_coriacea = Shell; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak restricted type error[E0446]: private type `Tortoise` in public interface --> $DIR/issue-33174-restricted-type-in-public-interface.rs:34:1 | LL | struct Tortoise; | - `Tortoise` declared as private ... LL | pub type Testudo_graeca = Shell; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0446`.