Rollup merge of #114703 - ouz-a:smir_allocation, r=oli-obk
Cover ParamConst in smir Others variants won't be useful for a while or ever(?), but we might need this one. r? ````@oli-obk````
This commit is contained in:
commit
1d0792bd80
@ -1165,7 +1165,9 @@ fn stable(&self, tables: &mut Tables<'tcx>) -> Self::T {
|
||||
let const_val = tables.tcx.valtree_to_const_val((c.ty(), val));
|
||||
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) => {
|
||||
stable_mir::ty::ConstantKind::Unevaluated(stable_mir::ty::UnevaluatedConst {
|
||||
|
@ -417,6 +417,7 @@ pub fn allocation_filter<'tcx>(
|
||||
pub enum ConstantKind {
|
||||
Allocated(Allocation),
|
||||
Unevaluated(UnevaluatedConst),
|
||||
ParamCt(Opaque),
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
|
Loading…
Reference in New Issue
Block a user