mirror of
https://github.com/rust-lang/rust.git
synced 2026-01-19 23:40:48 +00:00
12 lines
246 B
Rust
12 lines
246 B
Rust
struct Vec2 { y: f32 }
|
|
struct Vec3 { y: f32, z: f32 }
|
|
|
|
fn make(v: Vec2) {
|
|
let Vec3 { y: _, z: _ } = v;
|
|
//~^ ERROR mismatched types
|
|
//~| NOTE expected `Vec2`, found `Vec3`
|
|
//~| NOTE this expression has type `Vec2`
|
|
}
|
|
|
|
fn main() { }
|