mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
feat: Implement diagnostic for await
outside of async
This commit is contained in:
parent
aa00ddcf65
commit
8a51419a2d
6 changed files with 187 additions and 17 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue