diff options
Diffstat (limited to 'tests/ui/issues/issue-14541.rs')
-rw-r--r-- | tests/ui/issues/issue-14541.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-14541.rs b/tests/ui/issues/issue-14541.rs new file mode 100644 index 000000000..555ec9f98 --- /dev/null +++ b/tests/ui/issues/issue-14541.rs @@ -0,0 +1,10 @@ +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() { } |