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