aboutsummaryrefslogtreecommitdiff
path: root/crates/hir
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir')
-rw-r--r--crates/hir/src/code_model.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/hir/src/code_model.rs b/crates/hir/src/code_model.rs
index e783e0aba..a8b67da20 100644
--- a/crates/hir/src/code_model.rs
+++ b/crates/hir/src/code_model.rs
@@ -743,6 +743,10 @@ impl Function {
743 db.function_data(self.id).name.clone() 743 db.function_data(self.id).name.clone()
744 } 744 }
745 745
746 /// Get this function's return type
747 ///
748 /// The returned type can be converted to a [`Type`] via its `ty`
749 /// method.
746 pub fn ret_type(self, db: &dyn HirDatabase) -> RetType { 750 pub fn ret_type(self, db: &dyn HirDatabase) -> RetType {
747 let resolver = self.id.resolver(db.upcast()); 751 let resolver = self.id.resolver(db.upcast());
748 let ret_type = &db.function_data(self.id).ret_type; 752 let ret_type = &db.function_data(self.id).ret_type;