aboutsummaryrefslogtreecommitdiff
path: root/crates/hir
diff options
context:
space:
mode:
authorhi-rustin <[email protected]>2021-05-14 03:36:12 +0100
committerhi-rustin <[email protected]>2021-05-14 03:47:00 +0100
commitb98c119ba690afdcd21edb3b344834e42422df0a (patch)
tree5e62ad72b3d2fbaa952f42704a7415721b0acff5 /crates/hir
parent9803a9a148e1c5850d2f649ffbc1bb3575cfa929 (diff)
Apply async semantic token modifier to async/await keywords
Only async semantic token modifier
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 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);