mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
11 lines
209 B
Rust
11 lines
209 B
Rust
struct Vec2 { y: f32 }
|
|
struct Vec3 { y: f32, z: f32 }
|
|
|
|
fn make(v: Vec2) {
|
|
let Vec3 { y: _, z: _ } = v;
|
|
//~^ ERROR mismatched types
|
|
//~| expected struct `Vec2`, found struct `Vec3`
|
|
}
|
|
|
|
fn main() { }
|