2015-02-12 10:29:52 -05:00
|
|
|
use std::marker;
|
|
|
|
|
|
|
|
pub struct TypeWithState<State>(marker::PhantomData<State>);
|
2013-08-12 13:47:02 -07:00
|
|
|
pub struct MyState;
|
|
|
|
|
|
|
|
pub fn foo<State>(_: TypeWithState<State>) {}
|
|
|
|
|
|
|
|
pub fn bar() {
|
2015-05-05 18:22:20 +02:00
|
|
|
foo(TypeWithState(marker::PhantomData));
|
2017-02-02 21:35:31 +00:00
|
|
|
//~^ ERROR type annotations needed [E0282]
|
2013-08-12 13:47:02 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
}
|