1
Fork 0

Put the dots back

This commit is contained in:
Michael Goulet 2024-07-15 17:51:15 -04:00
parent 3de0a7c716
commit b84e2b7c98
5 changed files with 114 additions and 8 deletions

View file

@ -1214,11 +1214,14 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write {
&& let ty::Alias(_, alias_ty) =
self.tcx().fn_sig(fn_def_id).skip_binder().output().skip_binder().kind()
&& alias_ty.def_id == def_id
&& let generics = self.tcx().generics_of(fn_def_id)
// FIXME(return_type_notation): We only support lifetime params for now.
&& generics.own_params.iter().all(|param| matches!(param.kind, ty::GenericParamDefKind::Lifetime))
{
let num_args = self.tcx().generics_of(fn_def_id).count();
let num_args = generics.count();
write!(self, " {{ ")?;
self.print_def_path(fn_def_id, &args[..num_args])?;
write!(self, "() }}")?;
write!(self, "(..) }}")?;
}
Ok(())