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

[unstable option] empty_item_single_line #3356

Open
scampi opened this issue Feb 13, 2019 · 2 comments
Open

[unstable option] empty_item_single_line #3356

scampi opened this issue Feb 13, 2019 · 2 comments
Labels
unstable option tracking issue of an unstable option

Comments

@scampi
Copy link
Contributor

scampi commented Feb 13, 2019

Tracking issue for unstable option: empty_item_single_line

@scampi scampi added the unstable option tracking issue of an unstable option label Feb 13, 2019
@scampi scampi changed the title [unstable option] unstable option: empty_item_single_line [unstable option] empty_item_single_line Feb 18, 2019
@Emoun
Copy link

Emoun commented Feb 4, 2020

Hi,

I hope this is the right place to report this:

When the option brace_style is set to "AlwaysNextLine", then empty_item_single_line=true does not work for traits:

// Expected:
pub trait SomeTrait {}

// Produced:
pub trait SomeTrait 
{
}

Removing the brace_style option from the .toml will make rustfmt produce the expected formatting.

@vladh
Copy link

vladh commented Jul 8, 2024

When using empty_item_single_line=false with the following code

mod hello {
}

fn foo() {
}

I get this result

mod hello {}

fn foo() {
}

but I would expect this result

mod hello {
}

fn foo() {
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unstable option tracking issue of an unstable option
Projects
None yet
Development

No branches or pull requests

3 participants