diff options
| author | LeSeulArtichaut <leseulartichaut@gmail.com> | 2020-11-13 18:27:27 +0100 |
|---|---|---|
| committer | LeSeulArtichaut <leseulartichaut@gmail.com> | 2020-12-06 13:42:24 +0100 |
| commit | f3d4aa6afbad980da62b20cd4583079be7d62104 (patch) | |
| tree | 6d24f04e766861f077338af0be9e5c137d483206 /compiler/rustc_passes/src | |
| parent | bab20800f0e7e6252c5c0da0a7a1ba123785cbca (diff) | |
| download | rust-f3d4aa6afbad980da62b20cd4583079be7d62104.tar.gz rust-f3d4aa6afbad980da62b20cd4583079be7d62104.zip | |
Implement lowering of if-let guards to MIR
Diffstat (limited to 'compiler/rustc_passes/src')
| -rw-r--r-- | compiler/rustc_passes/src/check_const.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_passes/src/check_const.rs b/compiler/rustc_passes/src/check_const.rs index e37c6418eb8..2d6bbff460d 100644 --- a/compiler/rustc_passes/src/check_const.rs +++ b/compiler/rustc_passes/src/check_const.rs @@ -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( |
