Exhaustively match on ty::Const::kind
This commit is contained in:
parent
9b8e3eb8f7
commit
3a736a747d
@ -1095,7 +1095,18 @@ fn stable(&self, tables: &mut Tables<'tcx>) -> Self::T {
|
||||
}
|
||||
ty::ParamCt(param) => stable_mir::ty::ConstantKind::ParamCt(opaque(¶m)),
|
||||
ty::ErrorCt(_) => unreachable!(),
|
||||
_ => unimplemented!(),
|
||||
ty::InferCt(_) => unreachable!(),
|
||||
ty::BoundCt(_, _) => unimplemented!(),
|
||||
ty::PlaceholderCt(_) => unimplemented!(),
|
||||
ty::Unevaluated(uv) => {
|
||||
stable_mir::ty::ConstantKind::Unevaluated(stable_mir::ty::UnevaluatedConst {
|
||||
ty: tables.intern_ty(self.ty()),
|
||||
def: tables.const_def(uv.def),
|
||||
args: uv.args.stable(tables),
|
||||
promoted: None,
|
||||
})
|
||||
}
|
||||
ty::ExprCt(_) => unimplemented!(),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user