Infer type of match guard

This commit is contained in:
Marcus Klaas de Vries
2019-01-28 23:06:11 +01:00
parent 3f4f50baaa
commit 3daca3eb4d
10 changed files with 152 additions and 59 deletions

View File

@@ -421,7 +421,8 @@ fn test() {
match e {
E::A { x } => x,
E::B => 1,
E::B if foo => 1,
E::B => 10,
};
let ref d @ E::A { .. } = e;