error[E0282]: type annotations needed --> $DIR/unbounded-associated-type.rs:15:7 | LL | S(std::marker::PhantomData).foo(); | ^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the struct `PhantomData` | help: consider specifying the generic argument | LL | S(std::marker::PhantomData::).foo(); | +++++ error: aborting due to previous error For more information about this error, try `rustc --explain E0282`.