Skip to content

Closing braces inside macros are double indented with hard tabs #3068

Closed
@remagpie

Description

@remagpie

rustfmt version: rustfmt 0.99.5-nightly (90692a5 2018-09-26)

When hard_tabs is off, it is formatted like this:

macro_rules! foo {
    ($bar: expr, $t: ty) => {
        $bar(|x| {
            if x {
                None
            }
            else {
                None
            }
        })
    };
}

When hard_tabs is on, it is formatted like this:

macro_rules! foo {
	($bar: expr, $t: ty) => {
		$bar(|x| {
			if x {
				None
				}
			else {
				None
				}
			})
	};
}

Closing braces have one more indentation when hard_tabs is on.

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