Skip to content

Generics signature help should include type parameter defaults #12729

@jonas-schievink

Description

@jonas-schievink

For example, in std::ops::ControlFlow::<$0, the signature help is rendered as enum ControlFlow<B, C>, which does not tell the user that C is optional and only B needs to be provided. Rendering the default type would fix that, and result in enum ControlFlow<B, C = ()>.

It's possible that a default type would be too long when fully rendered, so the length should probably be limited (the HirDisplay machinery can already do that).

Metadata

Metadata

Assignees

Labels

C-featureCategory: feature requestS-actionableSomeone could pick this issue up and work on it right now

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions