use sealed::sealed; fn main() { trait Foo {} trait Bar {} #[sealed(erase)] trait Trait where T: ?Sized + Foo, { } struct Implementor {} #[sealed(erase)] impl Trait for Implementor where T: Foo + Bar {} }