Add Ty
to ConstKind::Value
This commit is contained in:
parent
58feec9b85
commit
a9702a6668
30 changed files with 180 additions and 186 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue