mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
cover ParamConst
This commit is contained in:
parent
8f1ea576b7
commit
c80281a861
@ -1136,7 +1136,9 @@ impl<'tcx> Stable<'tcx> for rustc_middle::mir::ConstantKind<'tcx> {
|
|||||||
let const_val = tables.tcx.valtree_to_const_val((c.ty(), val));
|
let const_val = tables.tcx.valtree_to_const_val((c.ty(), val));
|
||||||
stable_mir::ty::ConstantKind::Allocated(new_allocation(self, const_val, tables))
|
stable_mir::ty::ConstantKind::Allocated(new_allocation(self, const_val, tables))
|
||||||
}
|
}
|
||||||
_ => todo!(),
|
ty::ParamCt(param) => stable_mir::ty::ConstantKind::ParamCt(opaque(¶m)),
|
||||||
|
ty::ErrorCt(_) => unreachable!(),
|
||||||
|
_ => unimplemented!(),
|
||||||
},
|
},
|
||||||
ConstantKind::Unevaluated(unev_const, ty) => {
|
ConstantKind::Unevaluated(unev_const, ty) => {
|
||||||
stable_mir::ty::ConstantKind::Unevaluated(stable_mir::ty::UnevaluatedConst {
|
stable_mir::ty::ConstantKind::Unevaluated(stable_mir::ty::UnevaluatedConst {
|
||||||
|
@ -401,6 +401,7 @@ pub fn allocation_filter<'tcx>(
|
|||||||
pub enum ConstantKind {
|
pub enum ConstantKind {
|
||||||
Allocated(Allocation),
|
Allocated(Allocation),
|
||||||
Unevaluated(UnevaluatedConst),
|
Unevaluated(UnevaluatedConst),
|
||||||
|
ParamCt(Opaque),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
|
Loading…
Reference in New Issue
Block a user