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