use std::marker; pub struct TypeWithState(marker::PhantomData); pub struct MyState; pub fn foo(_: TypeWithState) {} pub fn bar() { foo(TypeWithState(marker::PhantomData)); //~^ ERROR type annotations needed [E0282] } fn main() { }