diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2022-11-10 10:47:41 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-10 10:47:41 -0500 |
| commit | 77fde5d49a8d5244e032ee7956589fd7f28cf0eb (patch) | |
| tree | 17c7c1679c7f832b3598279a3ad9740360ac429d /compiler | |
| parent | c6595ea22a5f05b3595a6ce3ea582e0a70e677f2 (diff) | |
| parent | 31157def1aa9c57424d605ac36a3704b3d26b4ff (diff) | |
| download | rust-77fde5d49a8d5244e032ee7956589fd7f28cf0eb.tar.gz rust-77fde5d49a8d5244e032ee7956589fd7f28cf0eb.zip | |
Rollup merge of #104233 - compiler-errors:issue-104209, r=lcnr
Don't ICE when encountering `ConstKind::Error` in `RequiredConstsVisitor` Fixes #104209
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_mir_transform/src/required_consts.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_mir_transform/src/required_consts.rs b/compiler/rustc_mir_transform/src/required_consts.rs index cc75947d9dd..0ea8f2ba93f 100644 --- a/compiler/rustc_mir_transform/src/required_consts.rs +++ b/compiler/rustc_mir_transform/src/required_consts.rs @@ -17,7 +17,7 @@ impl<'tcx> Visitor<'tcx> for RequiredConstsVisitor<'_, 'tcx> { 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), |
