// run-pass #![allow(unused_variables)] use std::marker::PhantomData; struct TheType { t: PhantomData } pub trait TheTrait { type TheAssociatedType; } impl TheTrait for () { type TheAssociatedType = (); } pub trait Shape { fn doit(&self) { } } impl Shape

for TheType { } fn main() { let ball = TheType { t: PhantomData }; let handle: &dyn Shape<()> = &ball; }