about summary refs log tree commit diff
path: root/compiler/rustc_ty_utils
diff options
context:
space:
mode:
authorBoxy <supbscripter@gmail.com>2024-06-03 02:34:35 +0100
committerBoxy <supbscripter@gmail.com>2024-06-05 22:25:41 +0100
commita9702a66684f0e1f412d92a83761be2e461b69fb (patch)
treea0996c6eb298ce6f655671c36517f7dd44e501c4 /compiler/rustc_ty_utils
parent58feec9b85a18d26507dfe6d075fd128a1265888 (diff)
downloadrust-a9702a66684f0e1f412d92a83761be2e461b69fb.tar.gz
rust-a9702a66684f0e1f412d92a83761be2e461b69fb.zip
Add `Ty` to `ConstKind::Value`
Diffstat (limited to 'compiler/rustc_ty_utils')
-rw-r--r--compiler/rustc_ty_utils/src/consts.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_ty_utils/src/consts.rs b/compiler/rustc_ty_utils/src/consts.rs
index b403e063d40..f5c66e48ea6 100644
--- a/compiler/rustc_ty_utils/src/consts.rs
+++ b/compiler/rustc_ty_utils/src/consts.rs
@@ -23,7 +23,7 @@ fn destructure_const<'tcx>(
     tcx: TyCtxt<'tcx>,
     const_: ty::Const<'tcx>,
 ) -> ty::DestructuredConst<'tcx> {
-    let ty::ConstKind::Value(valtree) = const_.kind() else {
+    let ty::ConstKind::Value(ct_ty, valtree) = const_.kind() else {
         bug!("cannot destructure constant {:?}", const_)
     };
 
@@ -32,9 +32,6 @@ fn destructure_const<'tcx>(
         _ => bug!("cannot destructure constant {:?}", const_),
     };
 
-    // THISPR
-    let ct_ty: Ty<'tcx> = todo!();
-
     let (fields, variant) = match ct_ty.kind() {
         ty::Array(inner_ty, _) | ty::Slice(inner_ty) => {
             // construct the consts for the elements of the array/slice