Add a test to see if tuple struct gets combined

This commit is contained in:
topecongiro 2017-11-02 20:28:38 +09:00
parent 809e06ee32
commit dc035bbbee
2 changed files with 26 additions and 0 deletions

View File

@ -48,3 +48,18 @@ fn issue_1874() {
y
}
}
fn combine_patterns() {
let x = match y {
Some(
Some(
Foo {
z: Bar(..),
a: Bar(..),
b: Bar(..),
},
),
) => z,
_ => return,
};
}

View File

@ -63,3 +63,14 @@ fn issue_1874() {
y
}
}
fn combine_patterns() {
let x = match y {
Some(Some(Foo {
z: Bar(..),
a: Bar(..),
b: Bar(..),
})) => z,
_ => return,
};
}