mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
15 lines
295 B
Rust
15 lines
295 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 struct `Foo<{float}, _>`
|
|
//~| found type `{integer}`
|
|
//~| expected struct `Foo`, found integer
|
|
}
|
|
|
|
}
|