diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-03-12 14:46:42 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-03-12 14:46:42 +0000 |
commit | 7bbdca6182ca6ab562fe7644015b30b171c5748e (patch) | |
tree | 07104eb5418d633e4ec14251596dbeb9b0a15b91 /crates/ra_syntax/test_data/parser/ok/0037_mod.rs | |
parent | afd64ef4f75844ff61bc5967406f40ec90047348 (diff) | |
parent | 98e8ad5e608b739d1d28a43c8c69358e77c1c1f0 (diff) |
Merge #3564
3564: Better handling of a few kinds of cargo/clippy diagnostics r=matklad a=kiljacken
This was initially supposed to just be a fix for #3433, but I caught a few things that ended up being useful as well.
This PR primarily makes us handle multi-edit fix suggestions properly. Instead of just applying the first fix we apply all the parts of the fix in a single action.
Second up, this PR handles diagnostics with multiple primary spans, f.x. the unused import diagnostic from rustc:
![image](https://user-images.githubusercontent.com/209321/76531793-03269480-6476-11ea-9180-41c0ea705553.png)
The LSP doesn't handle this too well, as it only support a single complete range for each diagnostic, so we get duplicate messages in the problem panel of VSCode:
![image](https://user-images.githubusercontent.com/209321/76531901-29e4cb00-6476-11ea-9746-cd57f8974b85.png)
However, I feel like the improved visual aspect in-editor outweighs the duplication in the problem panel. I'm open to not including the second commit if anybody really doesn't like the idea of duplicate diagnostics in the problem pane.
Fixes #3433
Fixes #3257
Co-authored-by: Emil Lauridsen <[email protected]>
Diffstat (limited to 'crates/ra_syntax/test_data/parser/ok/0037_mod.rs')
0 files changed, 0 insertions, 0 deletions