rust/src/test/ui/slightly-nice-generic-literal-messages.rs
2018-12-25 21:08:33 -07:00

15 lines
303 B
Rust

use std::marker;
struct Foo<T,U>(T, marker::PhantomData<U>);
fn main() {
match Foo(1.1, marker::PhantomData) {
1 => {}
//~^ ERROR mismatched types
//~| expected type `Foo<{float}, _>`
//~| found type `{integer}`
//~| expected struct `Foo`, found integral variable
}
}