1 error[E0282]: type annotations needed
2 --> $DIR/issue-6458.rs:9:4
4 LL | foo(TypeWithState(marker::PhantomData));
5 | ^^^ cannot infer type for type parameter `State` declared on the function `foo`
7 help: type parameter declared here
8 --> $DIR/issue-6458.rs:6:12
10 LL | pub fn foo<State>(_: TypeWithState<State>) {}
13 error: aborting due to previous error
15 For more information about this error, try `rustc --explain E0282`.