Add a test to see if tuple struct gets combined
This commit is contained in:
parent
809e06ee32
commit
dc035bbbee
@ -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,
|
||||
};
|
||||
}
|
||||
|
@ -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,
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user