710dcbd381
Replace "integral variable" with "integer" and replace "floating-point variable" with "floating-point number" to make the message less confusing.
15 lines
293 B
Rust
15 lines
293 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 integer
|
|
}
|
|
|
|
}
|