rust-analyzer/crates
bors[bot] 25368d2430
Merge #9954
9954: feat: Show try operator propogated types on ranged hover  r=matklad a=Veykril

Basically this just shows the type of the inner expression of the `?` expression as well as the type of the expression that the `?` returns from:
![Code_wIrCxMqLH9](https://user-images.githubusercontent.com/3757771/130111025-f7ee0742-214a-493b-947a-b4a671e4be92.png)

Unless both of these types are `core::result::Result` in which case we show the error types only.
![Code_Xruw5FCBNI](https://user-images.githubusercontent.com/3757771/130111024-f9caef82-92e4-4070-b3dd-f2ff9e5d87a9.png)

If both types are `core::option::Option` with different type params we do not show this special hover either as it would be pointless(instead fallback to default type hover)

Very much open to changes to the hover text here(I suppose we also want to show the actual type of the `?` expression, that is its output type?).

Fixes #9931

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-09-01 09:26:10 +00:00
..
base_db internal: reduce coupling 2021-08-31 19:14:33 +03:00
cfg Simplify int_in_range 2021-08-31 13:11:17 +02:00
flycheck switch log crate to tracing 2021-08-30 15:11:42 +08:00
hir switch log crate to tracing 2021-08-30 15:11:42 +08:00
hir_def Augment panic context when resolving path 2021-08-31 13:42:46 +02:00
hir_expand internal: reduce coupling 2021-08-31 19:14:33 +03:00
hir_ty Merge #9954 2021-09-01 09:26:10 +00:00
ide Merge #9954 2021-09-01 09:26:10 +00:00
ide_assists Fix extract_function with macro arg 2021-09-01 11:11:57 +02:00
ide_completion switch log crate to tracing 2021-08-30 15:11:42 +08:00
ide_db switch log crate to tracing 2021-08-30 15:11:42 +08:00
ide_diagnostics Merge #10089 2021-08-30 19:35:00 +00:00
ide_ssr fix: avoid pathological macro expansions 2021-08-09 16:15:02 +03:00
limit internal: add API to check what are the max limits in practice 2021-07-31 18:26:43 +03:00
mbe internal: reduce coupling 2021-08-31 19:14:33 +03:00
parser internal: improve style 2021-08-30 15:55:40 +03:00
paths internal: improve compilation critical path a bit 2021-08-28 22:43:37 +03:00
proc_macro_api internal: cleanup proc macro server error handlig 2021-08-31 19:01:39 +03:00
proc_macro_srv internal: cleanup proc macro server error handlig 2021-08-31 19:01:39 +03:00
proc_macro_test cargo_metadata 0.14 2021-07-09 11:01:55 -04:00
profile internal: make non-zero times stand out in profile 2021-07-31 16:22:03 +03:00
project_model Merge #10005 2021-08-30 08:42:13 +00:00
rust-analyzer internal: reduce coupling 2021-08-31 19:14:33 +03:00
sourcegen minor: make sure that project_root works correctly 2021-07-13 15:02:29 +03:00
stdx Remove proc macro management thread 2021-07-08 16:43:39 +02:00
syntax Fix extract_function with macro arg 2021-09-01 11:11:57 +02:00
test_utils Refactor & improve handling of overloaded binary operators 2021-08-22 17:35:50 +02:00
text_edit Handle all rename special cases for all record pattern fields 2021-08-16 22:48:38 +02:00
toolchain minor: drop dummy authors field 2021-07-05 14:19:41 +03:00
tt internal: reduce coupling 2021-08-31 19:14:33 +03:00
vfs internal: document that ascription is preferred to a turbo fish 2021-08-11 14:16:15 +03:00
vfs-notify switch log crate to tracing 2021-08-30 15:11:42 +08:00