```rust #![feature(existential_type)] pub mod foo { pub existential type Foo: ::std::fmt::Debug; pub fn foo() -> Foo { S } #[derive(Debug)] struct S; } ``` gives ``` warning: private type `foo::S` in public interface (error E0446) --> src/lib.rs:4:5 | 4 | pub existential type Foo: ::std::fmt::Debug; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: #[warn(private_in_public)] on by default = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537> ``` Returning `impl ::std::fmt::Debug` does not have this restriction.