Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir/src/lib.rs')
-rw-r--r--crates/hir/src/lib.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs
index 266ef2a55c..1a3becdf50 100644
--- a/crates/hir/src/lib.rs
+++ b/crates/hir/src/lib.rs
@@ -1,4 +1,4 @@
-//! HIR (previously known as descriptors) provides a high-level object oriented
+//! HIR (previously known as descriptors) provides a high-level object-oriented
//! access to Rust code.
//!
//! The principal difference between HIR and syntax trees is that HIR is bound
@@ -1828,6 +1828,9 @@ impl DefWithBody {
is_bang: true,
}
.into(),
+ BodyDiagnostic::AwaitOutsideOfAsync { node, location } => {
+ AwaitOutsideOfAsync { node: *node, location: location.clone() }.into()
+ }
BodyDiagnostic::UnreachableLabel { node, name } => {
UnreachableLabel { node: *node, name: name.clone() }.into()
}
@@ -2186,11 +2189,11 @@ impl Function {
}
pub fn is_const(self, db: &dyn HirDatabase) -> bool {
- db.function_data(self.id).has_const_kw()
+ db.function_data(self.id).is_const()
}
pub fn is_async(self, db: &dyn HirDatabase) -> bool {
- db.function_data(self.id).has_async_kw()
+ db.function_data(self.id).is_async()
}
/// Does this function have `#[test]` attribute?