Implement lowering of if-let guards to MIR

This commit is contained in:
LeSeulArtichaut 2020-11-13 18:27:27 +01:00
parent bab20800f0
commit f3d4aa6afb
7 changed files with 84 additions and 11 deletions

View file

@ -45,6 +45,8 @@ impl NonConstExpr {
return None;
}
Self::Match(IfLetGuardDesugar) => bug!("if-let guard outside a `match` expression"),
// All other expressions are allowed.
Self::Loop(Loop | While | WhileLet)
| Self::Match(