Use ty::TraitRef::new in rustdoc

This commit is contained in:
Maybe Waffle 2023-04-25 16:31:30 +00:00
parent 8f7fe4a303
commit f0dd95c3a8

View File

@ -44,7 +44,7 @@ where
discard_positive_impl: bool,
) -> Option<Item> {
let tcx = self.cx.tcx;
let trait_ref = ty::Binder::dummy(tcx.mk_trait_ref(trait_def_id, [ty]));
let trait_ref = ty::Binder::dummy(ty::TraitRef::new(tcx, trait_def_id, [ty]));
if !self.cx.generated_synthetics.insert((ty, trait_def_id)) {
debug!("get_auto_trait_impl_for({:?}): already generated, aborting", trait_ref);
return None;