aboutsummaryrefslogtreecommitdiff
path: root/crates/hir
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir')
-rw-r--r--crates/hir/src/lib.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs
index 7e8a5bca3..d443b124c 100644
--- a/crates/hir/src/lib.rs
+++ b/crates/hir/src/lib.rs
@@ -875,6 +875,10 @@ impl Function {
875 db.function_data(self.id).is_unsafe() 875 db.function_data(self.id).is_unsafe()
876 } 876 }
877 877
878 pub fn is_async(self, db: &dyn HirDatabase) -> bool {
879 db.function_data(self.id).is_async()
880 }
881
878 pub fn diagnostics(self, db: &dyn HirDatabase, sink: &mut DiagnosticSink) { 882 pub fn diagnostics(self, db: &dyn HirDatabase, sink: &mut DiagnosticSink) {
879 let krate = self.module(db).id.krate(); 883 let krate = self.module(db).id.krate();
880 hir_def::diagnostics::validate_body(db.upcast(), self.id.into(), sink); 884 hir_def::diagnostics::validate_body(db.upcast(), self.id.into(), sink);