1
Fork 0

Refactor tcx mk_const parameters.

This commit is contained in:
Mateusz 2022-11-04 20:33:32 +00:00
parent 6330c27ae2
commit c97fd8183a
No known key found for this signature in database
GPG key ID: 386CB5E415137469
21 changed files with 74 additions and 104 deletions

View file

@ -555,13 +555,13 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
GenericParamDefKind::Const { .. } => {
let bound_var = ty::BoundVariableKind::Const;
bound_vars.push(bound_var);
tcx.mk_const(ty::ConstS {
ty: tcx.type_of(param.def_id),
kind: ty::ConstKind::Bound(
tcx.mk_const(
ty::ConstKind::Bound(
ty::INNERMOST,
ty::BoundVar::from_usize(bound_vars.len() - 1),
),
})
tcx.type_of(param.def_id),
)
.into()
}
});