Stream: t-compiler/wg-rls-2.0

Topic: Shortening inline hints #1946

detrumi (Oct 10 2019 at 13:30, on Zulip):

For shortening inline type hints, I'd hoped to transform the type a bit to change long parts to _ or ... or similar.
Is it better to replace those parts with some dummy types that print the right thing, or is it possible to display just parts of the type without re-implementing the whole formatting part?

Daniel Mcnab (Oct 10 2019 at 13:32, on Zulip):

I guess the formatting part could be refactored to take an optional depth parameter? Maybe using unlimited depth for when you hover over the declaration, but inline hints and hovering over uses could be limited too

matklad (Oct 10 2019 at 13:33, on Zulip):

Good question! I don't know the right answer :)

I think we need some of general formatting infra with knobs in ra_hir, and use it for both HirDispaly and type hints. Basically, what @Daniel Mcnab suggesting

Last update: Sep 18 2020 at 20:15UTC