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