]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_mir_transform/src/required_consts.rs
Rollup merge of #105004 - TaKO8Ki:fix-104897, r=wesleywiser
[rust.git] / compiler / rustc_mir_transform / src / required_consts.rs
index cc75947d9dda73b2f38b6e47cc03a5bf47311e2b..0ea8f2ba93fd8a1c621338441d08255aab439e21 100644 (file)
@@ -17,7 +17,7 @@ fn visit_constant(&mut self, constant: &Constant<'tcx>, _: Location) {
         let literal = constant.literal;
         match literal {
             ConstantKind::Ty(c) => match c.kind() {
-                ConstKind::Param(_) => {}
+                ConstKind::Param(_) | ConstKind::Error(_) => {}
                 _ => bug!("only ConstKind::Param should be encountered here, got {:#?}", c),
             },
             ConstantKind::Unevaluated(..) => self.required_consts.push(*constant),