error[E0282]: type annotations needed for `B` --> $DIR/issue-17551.rs:6:15 | LL | let foo = B(marker::PhantomData); | --- ^ cannot infer type for type parameter `T` declared on the struct `B` | | | consider giving `foo` the explicit type `B`, where the type parameter `T` is specified error: aborting due to previous error For more information about this error, try `rustc --explain E0282`.