Skip to content

Complete thin-arrow on function return position #20885

@A4-Tacks

Description

@A4-Tacks

Completing the 'thin-arrow' (->) will make writing function return types more convenient

Just like in some languages that don't require 'thin-arrow's

Implement:

When writing an identifier at the return position of fn to complete a type or type keyword (#20571), insert "-> " before the completion result

Example: fn foo() us$0 {} into fn foo() -> usize {}

NOTE: Do not apply to where completion items

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions