1
Fork 0

Reduce direct mk_ty usage.

We use more specific `mk_*` functions in most places, might as well use
them as much as possible.
This commit is contained in:
Nicholas Nethercote 2023-02-08 12:28:03 +11:00
parent 6248bbbf26
commit 7a72560154
25 changed files with 92 additions and 82 deletions

View file

@ -527,13 +527,13 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
let kind = ty::BoundTyKind::Param(param.def_id, param.name);
let bound_var = ty::BoundVariableKind::Ty(kind);
bound_vars.push(bound_var);
tcx.mk_ty(ty::Bound(
tcx.mk_bound(
ty::INNERMOST,
ty::BoundTy {
var: ty::BoundVar::from_usize(bound_vars.len() - 1),
kind,
},
))
)
.into()
}
GenericParamDefKind::Lifetime => {