rust/crates/ide_assists
bors[bot] 63d2df1e36
Merge #11699
11699: feat: assist to remove unneeded `async`s r=Ethiraric a=Ethiraric

This should fix #11392 

This PR adds a quickfix on functions marked with `async` that suggests, if and only if no `await` expression in find in the body of the function (it relies on `SyntaxNode::descendants()` to recursively traverse blocks), to remove the `async` keyword.

The lint is made so that it triggers only if the cursor is not in the body of the function, so that it does not pollute the quickfix list.

It does not trigger a diagnostic. I don't know if this repository is the place to implement those (`clippy`?). If it is, I would very much like pointers on where to start looking.

If there are test cases I haven't thought about, please do suggest.

Co-authored-by: Ethiraric <ethiraric@gmail.com>
2022-04-03 12:42:52 +00:00
..
src Merge #11699 2022-04-03 12:42:52 +00:00
Cargo.toml minor: Bump dependencies 2022-03-22 17:42:24 +01:00