rust/tests/ui/slightly-nice-generic-literal-messages.rs

15 lines
300 B
Rust
Raw Normal View History

use std::marker;
struct Foo<T,U>(T, marker::PhantomData<U>);
fn main() {
match Foo(1.1, marker::PhantomData) {
1 => {}
2015-01-12 00:01:44 -06:00
//~^ ERROR mismatched types
//~| expected struct `Foo<{float}, _>`
2016-07-28 11:49:31 -05:00
//~| found type `{integer}`
//~| expected `Foo<{float}, _>`, found integer
}
}