Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/pretty.rs')
| -rw-r--r-- | crates/hir-def/src/pretty.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/hir-def/src/pretty.rs b/crates/hir-def/src/pretty.rs index 8e0df46970..d3135bba96 100644 --- a/crates/hir-def/src/pretty.rs +++ b/crates/hir-def/src/pretty.rs @@ -192,12 +192,17 @@ pub(crate) fn print_type_ref( print_type_ref(db, elem, buf)?; write!(buf, "]")?; } - TypeRef::Fn(args_and_ret, varargs, is_unsafe) => { + TypeRef::Fn(args_and_ret, varargs, is_unsafe, abi) => { let ((_, return_type), args) = args_and_ret.split_last().expect("TypeRef::Fn is missing return type"); if *is_unsafe { write!(buf, "unsafe ")?; } + if let Some(abi) = abi { + buf.write_str("extern ")?; + buf.write_str(abi)?; + buf.write_char(' ')?; + } write!(buf, "fn(")?; for (i, (_, typeref)) in args.iter().enumerate() { if i != 0 { |