diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-12-06 13:26:54 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-12-06 13:26:54 +0000 |
commit | 1403ddf029a6a4ced904146ac7b475c923f6129f (patch) | |
tree | 5de8d09fea220460bf49657f086d3130c79eb491 /xtask/tests/tidy.rs | |
parent | 8d5aa08712e782f22f04525f291ec74dae183568 (diff) | |
parent | 45b8b3d57fd1a38a0ccce8516cbebbd09184d59a (diff) |
Merge #6734
6734: Emit additional diagnostics for hints/help/etc r=lnicola a=jonas-schievink
This makes rust-analyzer diagnostics match native rustc diagnostics in the terminal more closely. Unfortunately all of this is a bodge, since we already provide this information to the client in the form of `DiagnosticRelatedInformation`, but at least VS Code chooses such a poor UI for these that they don't help much, as evidenced [here](https://twitter.com/yaahc_/status/1335297260444250112) and in https://github.com/rust-lang/rust/issues/79741.
This PR papers over these client UI problems by taking the `DiagnosticRelatedInformation` and turning each one into its own hint-level diagnostic, which makes it show up in the source code. Quick fixes are attached to all resulting diagnostics, which makes them more discoverable.
### Example: "Consider removing this semicolon"



### Example: "Value used after move"


Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'xtask/tests/tidy.rs')
0 files changed, 0 insertions, 0 deletions