Skip to content

Incorrect indentation when using return in a macro #3936

@stevenroose

Description

@stevenroose

This macros is formatted using rustfmt:

macro_rules! m {
	($a:expr) => {
		if $a {
			return;
			}
	};
}

That closing curly bracket under the return clearly has to be one indented one level less.

Config used:

hard_tabs = true
use_small_heuristics = "Off"

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-macrosArea: macros (procedural macros, macro_rules! macros, etc.)I-poor-formattingIssue: poor formattingonly-with-optionRequires a non-default option value to reproduce

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions