25368d2430
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> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |