about summary refs log tree commit diff
path: root/compiler/rustc_passes/src
diff options
context:
space:
mode:
authorLeSeulArtichaut <leseulartichaut@gmail.com>2020-11-13 18:27:27 +0100
committerLeSeulArtichaut <leseulartichaut@gmail.com>2020-12-06 13:42:24 +0100
commitf3d4aa6afbad980da62b20cd4583079be7d62104 (patch)
tree6d24f04e766861f077338af0be9e5c137d483206 /compiler/rustc_passes/src
parentbab20800f0e7e6252c5c0da0a7a1ba123785cbca (diff)
downloadrust-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.rs2
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(