Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-diagnostics/src/handlers/await_outside_of_async.rs')
-rw-r--r--crates/ide-diagnostics/src/handlers/await_outside_of_async.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/ide-diagnostics/src/handlers/await_outside_of_async.rs b/crates/ide-diagnostics/src/handlers/await_outside_of_async.rs
index 2a7b0098ed..e6adac9da7 100644
--- a/crates/ide-diagnostics/src/handlers/await_outside_of_async.rs
+++ b/crates/ide-diagnostics/src/handlers/await_outside_of_async.rs
@@ -4,7 +4,7 @@ use crate::{Diagnostic, DiagnosticsContext, adjusted_display_range};
//
// This diagnostic is triggered if the `await` keyword is used outside of an async function or block
pub(crate) fn await_outside_of_async(
- ctx: &DiagnosticsContext<'_>,
+ ctx: &DiagnosticsContext<'_, '_>,
d: &hir::AwaitOutsideOfAsync,
) -> Diagnostic {
let display_range =
@@ -52,6 +52,7 @@ async fn bar() {
fn await_inside_closure() {
check_diagnostics(
r#"
+//- minicore: future
async fn foo() {}
async fn bar() {
@@ -66,6 +67,7 @@ async fn bar() {
fn await_inside_async_block() {
check_diagnostics(
r#"
+//- minicore: future
async fn foo() {}
fn bar() {
@@ -79,6 +81,7 @@ fn bar() {
fn await_in_complex_context() {
check_diagnostics(
r#"
+//- minicore: future
async fn foo() {}
fn bar() {