rustfmt
rustfmt copied to clipboard
[unstable option] empty_item_single_line
Tracking issue for unstable option: empty_item_single_line
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.
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() {
}