diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-03-16 08:05:24 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-03-16 08:05:24 +0000 |
commit | 1a82af3527e476d52410ff4dfd2fb4c57466abcb (patch) | |
tree | 0c86e28a43908e099bb522727f93c28b301e6f3c /crates/ide/src/typing | |
parent | 62ec04bbd53ba50e21a7b8f23d46958d322640eb (diff) | |
parent | d5f0f58e6330efd8200f93a6904caafc600a904e (diff) | |
parent | 455b418263df80da5cd80e2af1df27b7e165c0c3 (diff) |
Merge #7900 #8000
7900: show function params in completion detail r=matklad a=JoshMcguigan
This resolves #7842 by updating the detail for function completions from `-> T` to `fn(T, U) -> V`. I added an expicit unit test for this, `ide_completion::render::fn_detail_includes_args_and_return_type`, which passes.
Lots of other unit tests fail (~60 of them) due to this change, although I believe the failures are purely cosmetic (they were testing the exact format of this output). I'm happy to go update those tests, but before I do that I'd like to make sure this is in fact the format we want for the detail?
edit - I realized `UPDATE_EXPECT=1 cargo test` automatically updates `expect!` tests. Big :+1: to whoever worked on that! So I'll go ahead and update all these tests soon. But I still would like to confirm `fn(T, U) -> V` is the desired content in the `detail` field.
8000: Use hir formatter for hover text r=matklad a=oxalica
Fix #2765 , (should) fix #4665
Co-authored-by: Josh Mcguigan <[email protected]>
Co-authored-by: oxalica <[email protected]>