Skip to content

emacs rust-mode: Cannot indent second line of a struct instantiation in some cases #11239

Description

@mwillsey

Example:

Foo {a: 1, b: 2, c: 3,
d: 4, e: 5}

if you indent the second line, it will work and result in:

Foo {a: 1, b: 2, c: 3,
     d: 4, e: 5}

However, if there were a space after the '{':

Foo { a: 1, b: 2, c: 3,
d: 4, e: 5}

you would expect pressing tab on the second line to indent to:

Foo { a: 1, b: 2, c: 3,
      d: 4, e: 5}

instead an error is raised, saying that forward-to-word's definition is void.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions