rust/crates
bors[bot] 7bbdca6182
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 <mine809@gmail.com>
2020-03-12 14:46:42 +00:00
..
ra_arena
ra_assists Rerail split_import API onto AST 2020-03-06 14:08:43 +01:00
ra_cargo_watch Handle diagnostics with multiple primary spans 2020-03-12 15:24:20 +01:00
ra_cfg
ra_db Add extern source 2020-03-11 11:04:02 +08:00
ra_fmt When joining lines, unwrap trivial diverging blocks 2020-02-24 17:17:05 +01:00
ra_hir Simplify 2020-03-09 11:19:03 +01:00
ra_hir_def Add resolve_extern_path in DB 2020-03-11 01:06:01 +08:00
ra_hir_expand Add extern source 2020-03-11 11:04:02 +08:00
ra_hir_ty Merge #3549 2020-03-11 10:51:07 +00:00
ra_ide Continue multiline non-doc comment blocks 2020-03-11 12:58:16 +01:00
ra_ide_db Merge #3549 2020-03-11 10:51:07 +00:00
ra_mbe Merge #3513 2020-03-09 08:56:58 +00:00
ra_parser Fix parsing of stement-ish binary expressions 2020-03-11 14:28:18 +01:00
ra_prof Allow specifying additional info on call to profile 2020-03-06 17:36:51 +01:00
ra_project_model Add extern source 2020-03-11 11:04:02 +08:00
ra_syntax Merge pull request #3562 from FireofGods/display_for_node 2020-03-12 15:40:53 +01:00
ra_text_edit Remove unused dependencies 2020-02-27 14:04:13 +09:00
ra_tt
rust-analyzer Merge #3549 2020-03-11 10:51:07 +00:00
test_utils Check only one fixture 2020-03-11 00:45:03 +08:00