about summary refs log tree commit diff
path: root/compiler/rustc_middle
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-07-15 17:51:15 -0400
committerMichael Goulet <michael@errs.io>2024-07-17 11:08:28 -0400
commitb84e2b7c98c687b07e28458db1e8ca68157b0d15 (patch)
tree6c7848a4c9c0e24860d544ca39c0b65ba6351a74 /compiler/rustc_middle
parent3de0a7c716daab58bdb6551b0d0af6a466486639 (diff)
downloadrust-b84e2b7c98c687b07e28458db1e8ca68157b0d15.tar.gz
rust-b84e2b7c98c687b07e28458db1e8ca68157b0d15.zip
Put the dots back
Diffstat (limited to 'compiler/rustc_middle')
-rw-r--r--compiler/rustc_middle/src/ty/print/pretty.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs
index df080b2887b..57cd2dc73c4 100644
--- a/compiler/rustc_middle/src/ty/print/pretty.rs
+++ b/compiler/rustc_middle/src/ty/print/pretty.rs
@@ -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(())