Replace tcx.mk_trait_ref with ty::TraitRef::new

This commit is contained in:
Maybe Waffle
2023-04-25 16:07:48 +00:00
parent 2d8c905e15
commit 46b01abbcd
41 changed files with 193 additions and 125 deletions

View File

@@ -689,7 +689,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
let assoc_bindings = self.create_assoc_bindings_for_generic_args(args);
let poly_trait_ref =
ty::Binder::bind_with_vars(tcx.mk_trait_ref(trait_def_id, substs), bound_vars);
ty::Binder::bind_with_vars(ty::TraitRef::new(tcx, trait_def_id, substs), bound_vars);
debug!(?poly_trait_ref, ?assoc_bindings);
bounds.push_trait_bound(tcx, poly_trait_ref, span, constness);
@@ -822,7 +822,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
if let Some(b) = trait_segment.args().bindings.first() {
prohibit_assoc_ty_binding(self.tcx(), b.span, Some((trait_segment, span)));
}
self.tcx().mk_trait_ref(trait_def_id, substs)
ty::TraitRef::new(self.tcx(), trait_def_id, substs)
}
#[instrument(level = "debug", skip(self, span))]