Skip to content

Strange formatting when comments are interspersed in an expression. #6269

Closed as not planned
@JulianKnodt

Description

@JulianKnodt

Minimal(ish) repo:

fn main() {
    let v = 1 + 1 +
  // test
  3;
  
    let test = 3;
    // o
}

I would expect the comment // test to have the correct indentation and 3 to also be indented.
The later lines are indented correctly.

Tested on current playground, Rust 1.70 Stable
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=b7abe453f272fbf2bd4e8dfeac344ddb

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