Skip to content

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

Open
@Boscop

Description

@Boscop

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,
	);

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions