Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Macro body gets formatted weirdly #3858

Closed
Boscop opened this issue Oct 11, 2019 · 1 comment · Fixed by #4189
Closed

Macro body gets formatted weirdly #3858

Boscop opened this issue Oct 11, 2019 · 1 comment · Fixed by #4189

Comments

@Boscop
Copy link

Boscop commented Oct 11, 2019

rustfmt formats this macro like this:

macro_rules! member_mut {
	($self:expr, $member:expr) => {{
		use self::Member::*;
		let r = &mut *$self;
		match $member {
			A => &mut r.a,
			B => &mut r.b,
			}
		}};
}

The closing braces are wrongly indented.

@ayazhafiz
Copy link
Contributor

This was fixed by 2836f9b

ayazhafiz added a commit to ayazhafiz/rustfmt that referenced this issue May 19, 2020
The cases with `hard_tabs: true` were fixed in 2836f9b.
Not sure about the rest, but this suggests a number of open issues are
already resolved.

Closes rust-lang#3608
Closes rust-lang#3550
Closes rust-lang#3638
Closes rust-lang#3858
Closes rust-lang#3936
ayazhafiz added a commit to ayazhafiz/rustfmt that referenced this issue May 20, 2020
The cases with `hard_tabs: true` were fixed in 2836f9b.
Not sure about the rest, but this suggests a number of open issues are
already resolved.

Closes rust-lang#3608
Closes rust-lang#3550
Closes rust-lang#3638
Closes rust-lang#3858
Closes rust-lang#3936
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants