Skip to content

Commit 1cbb062

Browse files
Type level consts can show up in MIR type checker
1 parent 0cffe5c commit 1cbb062

File tree

1 file changed

+2
-2
lines changed
  • compiler/rustc_borrowck/src/type_check

1 file changed

+2
-2
lines changed

compiler/rustc_borrowck/src/type_check/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,8 @@ impl<'a, 'b, 'tcx> Visitor<'tcx> for TypeVerifier<'a, 'b, 'tcx> {
349349
let tcx = self.tcx();
350350
let maybe_uneval = match constant.const_ {
351351
Const::Ty(_, ct) => match ct.kind() {
352-
ty::ConstKind::Unevaluated(_) => {
353-
bug!("should not encounter unevaluated Const::Ty here, got {:?}", ct)
352+
ty::ConstKind::Unevaluated(uv) => {
353+
Some(UnevaluatedConst { def: uv.def, args: uv.args, promoted: None })
354354
}
355355
_ => None,
356356
},

0 commit comments

Comments
 (0)