Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/expr_store/pretty.rs')
| -rw-r--r-- | crates/hir-def/src/expr_store/pretty.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/crates/hir-def/src/expr_store/pretty.rs b/crates/hir-def/src/expr_store/pretty.rs index 0058ddc1e4..bc16a9e979 100644 --- a/crates/hir-def/src/expr_store/pretty.rs +++ b/crates/hir-def/src/expr_store/pretty.rs @@ -1331,6 +1331,17 @@ impl Printer<'_> { TypeRef::Fn(fn_) => { let ((_, return_type), args) = fn_.params.split_last().expect("TypeRef::Fn is missing return type"); + if let Some(binder) = &fn_.binder { + w!( + self, + "for<{}> ", + binder + .iter() + .map(|it| it.display(self.db, self.edition)) + .format(", ") + .to_string() + ); + } if fn_.is_unsafe { w!(self, "unsafe "); } |