]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_passes/src/check_const.rs
Implement lowering of if-let guards to MIR
[rust.git] / compiler / rustc_passes / src / check_const.rs
index e37c6418eb81caace69acc2f6fe2216715c50d12..2d6bbff460d7fb6ea61eb613b91f2dfc44996957 100644 (file)
@@ -45,6 +45,8 @@ fn required_feature_gates(self) -> Option<&'static [Symbol]> {
                 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(