mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 15:54:15 +00:00
15 lines
269 B
Rust
15 lines
269 B
Rust
use std::marker;
|
|
|
|
pub struct TypeWithState<State>(marker::PhantomData<State>);
|
|
pub struct MyState;
|
|
|
|
pub fn foo<State>(_: TypeWithState<State>) {}
|
|
|
|
pub fn bar() {
|
|
foo(TypeWithState(marker::PhantomData));
|
|
//~^ ERROR type annotations needed [E0282]
|
|
}
|
|
|
|
fn main() {
|
|
}
|