about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-01-27 19:37:07 +0000
committerMichael Goulet <michael@errs.io>2025-01-27 23:32:48 +0000
commit1cbb062e54e376abe8b6f146f64c0d849e30c476 (patch)
tree555050a37e4d825cda83dd3556949d250a692d69
parent0cffe5cb95e36d45a3e61f7b1f5a9b21eddd77b4 (diff)
downloadrust-1cbb062e54e376abe8b6f146f64c0d849e30c476.tar.gz
rust-1cbb062e54e376abe8b6f146f64c0d849e30c476.zip
Type level consts can show up in MIR type checker
-rw-r--r--compiler/rustc_borrowck/src/type_check/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_borrowck/src/type_check/mod.rs b/compiler/rustc_borrowck/src/type_check/mod.rs
index e0196d55f20..a2ef5588f48 100644
--- a/compiler/rustc_borrowck/src/type_check/mod.rs
+++ b/compiler/rustc_borrowck/src/type_check/mod.rs
@@ -349,8 +349,8 @@ impl<'a, 'b, 'tcx> Visitor<'tcx> for TypeVerifier<'a, 'b, 'tcx> {
             let tcx = self.tcx();
             let maybe_uneval = match constant.const_ {
                 Const::Ty(_, ct) => match ct.kind() {
-                    ty::ConstKind::Unevaluated(_) => {
-                        bug!("should not encounter unevaluated Const::Ty here, got {:?}", ct)
+                    ty::ConstKind::Unevaluated(uv) => {
+                        Some(UnevaluatedConst { def: uv.def, args: uv.args, promoted: None })
                     }
                     _ => None,
                 },