mod m { use super::*; struct Priv; pub type Leak = Priv; //~ WARN: `Priv` is more private than the item `Leak` trait Trait3 { type A; } impl Trait3 for u8 { type A = T::A; } pub trait Trait4 { type A; } impl Trait4 for u8 { type A = ::A; //~^ ERROR: private associated type `Trait3::A` in public interface //~| ERROR: private trait `Trait3` in public interface } } pub trait Trait { type A; } impl Trait for u8 { type A = u8; } use m::*; fn check4() -> ::A { todo!() } fn main() {}