// crate foo #![feature(type_alias_impl_trait)] type Tait = impl Sized; fn _constrain() -> Tait {} struct WrapperWithDrop(T); impl Drop for WrapperWithDrop { fn drop(&mut self) {} } pub struct Foo(WrapperWithDrop); trait Id { type Id: ?Sized; } impl Id for T { type Id = T; } pub struct Bar(WrapperWithDrop<::Id>);