1
Fork 0

implement (as of now still unused) query for valtree -> constvalue conversion

This commit is contained in:
b-naber 2022-04-21 16:37:24 +02:00
parent 1157dc7167
commit 28af967bb9
3 changed files with 20 additions and 0 deletions

View file

@ -936,6 +936,11 @@ rustc_queries! {
remap_env_constness
}
/// Converts a type level constant value into `ConstValue`
query valtree_to_const_val(key: (Ty<'tcx>, ty::ValTree<'tcx>)) -> ConstValue<'tcx> {
desc { "convert type-level constant value to mir constant value"}
}
/// Destructure a constant ADT or array into its variant index and its
/// field values or return `None` if constant is invalid.
///