feat: Implement diagnostic for await outside of async

This commit is contained in:
Shoyu Vanilla 2024-08-05 03:07:24 +09:00
parent aa00ddcf65
commit 8a51419a2d
6 changed files with 187 additions and 17 deletions

View file

@ -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()
}