Skip to content

Incorrect indentation of if when no parens are used #415

Open
@Hi-Angel

Description

@Hi-Angel

Steps to reproduce

  1. In rust-mode insert the code below:
    fn foo() {
        if (foo
            && bar) {
            true;
        }
    }
    fn foo() {
        if foo
            && bar {
                true;
            }
    }
    
  2. Try to indent it.

Expected

The line true in both paragraphs has the same offset

Actual

The line true has different offset in one and another paragraph

Additional information

Tested on 20210423 version in Elpa as well as the latest code in repo as of 494d59f commit.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions