Skip to content

Autocomplete Turbofish's closing > #20955

@sbdchd

Description

@sbdchd

In the following example, $0 represents the cursor position:

fn foo() {
    let x = [1,2,3];

    // 1. get autocomplete suggestion
    let z = x.iter().collect::<V$0();
    // offers Vec<...>

    // 2. accept the completion
    let z = x.iter().collect::<Vec<$0>();
    //                               ^ missing the trailing `>`

      
    // what I really want is:
    let z = x.iter().collect::<Vec<$0>>();
    //                                ^ trailing `>` is here!
}
  1. get completion
Image
  1. autocomplete
Image

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