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

blank_lines_lower_bound ignores impl/traits functions #5067

Open
Ricky12Awesome opened this issue Nov 6, 2021 · 0 comments
Open

blank_lines_lower_bound ignores impl/traits functions #5067

Ricky12Awesome opened this issue Nov 6, 2021 · 0 comments
Labels
only-with-option requires a non-default option value to reproduce p-low

Comments

@Ricky12Awesome
Copy link

Version: rustfmt 2.0.0-rc.2-nightly (cc5521d9 2021-10-23)
rustfmt.toml:

tab_spaces = 2
blank_lines_lower_bound = 1

Before

fn a() {}
fn b() {}
mod foo {
  fn a() {}
  fn b() {}
}
struct Foo;
impl Foo {
  fn a() {}
  fn b() {}
}
trait Bar {
  fn a();
  fn b();
}

After (currently)

fn a() {}

fn b() {}

mod foo {

  fn a() {}

  fn b() {}
}

struct Foo;

impl Foo {
  fn a() {}
  fn b() {}
}

trait Bar {
  fn a();
  fn b();
}

After (what I think it should be formatted as)

fn a() {}

fn b() {}

mod foo {
  fn a() {}

  fn b() {}
}

struct Foo;

impl Foo {
  fn a() {}

  fn b() {}
}

trait Bar {
  fn a();
  
  fn b();
}

Related to #2954, also would be nice to have this #3382 (comment)

@ytmimi ytmimi added the only-with-option requires a non-default option value to reproduce label May 10, 2022
@ytmimi ytmimi added the p-low label Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
only-with-option requires a non-default option value to reproduce p-low
Projects
None yet
Development

No branches or pull requests

2 participants