aboutsummaryrefslogtreecommitdiff
path: root/crates/hir
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-05-14 10:50:36 +0100
committerGitHub <[email protected]>2021-05-14 10:50:36 +0100
commitab528e85f71da188722ae031b31a3a70bac1cadd (patch)
tree08d457f7e9e401200c72d9de3ff9bb6b221fb09c /crates/hir
parent9803a9a148e1c5850d2f649ffbc1bb3575cfa929 (diff)
parent765ccf2eca2c21af4e2d76b006809446d0034bc7 (diff)
Merge #8831
8831: Apply async semantic token modifier to async/await keywords r=Veykril a=hi-rustin close https://github.com/rust-analyzer/rust-analyzer/issues/8633 Co-authored-by: hi-rustin <[email protected]>
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);