rust/tests/ui/issues/issue-6458.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
269 B
Rust
Raw Normal View History

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() {
}