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

Rustfmt sometimes puts 2 args in one line, but the rest on separate lines #4301

Open
Boscop opened this issue Jul 1, 2020 · 1 comment
Open
Assignees
Milestone

Comments

@Boscop
Copy link

Boscop commented Jul 1, 2020

rustfmt 1.4.18-nightly (c1e9b7b 2020-06-13)

When I run rustfmt on this, it stays like this:

	self.renderer.render(
		texture,
		identity, // model
		identity, // perspective
		identity, // view
		None,     // alpha
		false,    // depth_test
		&mut target,
	);

But when I remove &mut before target:

	self.renderer.render(
		texture,
		identity, // model
		identity, // perspective
		identity, // view
		None,     // alpha
		false,    // depth_test
		target,
	);

rustfmt formats it like this:

	self.renderer.render(
		texture, identity, // model
		identity, // perspective
		identity, // view
		None,     // alpha
		false,    // depth_test
		target,
	);

Note: texture, identity, // model in one line.
:(

Expected output

	self.renderer.render(
		texture,
		identity, // model
		identity, // perspective
		identity, // view
		None,     // alpha
		false,    // depth_test
		target,
	);
@topecongiro topecongiro added this to the 3.0.0 milestone Jul 3, 2020
@ytmimi
Copy link
Contributor

ytmimi commented Jul 26, 2022

@calebcartwright this is the same issue that we're dealing with in #5337 (comment), and I think we'll need a new variant to resolve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants