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:
parent
6248bbbf26
commit
7a72560154
25 changed files with 92 additions and 82 deletions
|
@ -2071,14 +2071,14 @@ fn replace_param_and_infer_substs_with_placeholder<'tcx>(
|
|||
|
||||
fn fold_ty(&mut self, t: Ty<'tcx>) -> Ty<'tcx> {
|
||||
if let ty::Infer(_) = t.kind() {
|
||||
self.tcx.mk_ty(ty::Placeholder(ty::PlaceholderType {
|
||||
self.tcx.mk_placeholder(ty::PlaceholderType {
|
||||
universe: ty::UniverseIndex::ROOT,
|
||||
name: ty::BoundTyKind::Anon({
|
||||
let idx = self.idx;
|
||||
self.idx += 1;
|
||||
idx
|
||||
}),
|
||||
}))
|
||||
})
|
||||
} else {
|
||||
t.super_fold_with(self)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue