horaedb
horaedb copied to clipboard
Formatter can't recognize newline missing
Description Now the rust formatter can't recognize the necessary newline missing, e.g.:
use crate::{
instance::{Instance, InstanceRef},
mysql::{error::*, worker::MysqlWorker},
};
pub struct MysqlService<C, Q> {
Make the formatter can fix this case.
Proposal No proposal yet.
Additional context
There is a tracking issue in rustfmt:
- https://github.com/rust-lang/rustfmt/issues/3382
current version of blank_lines_lower_bound
is not what we want: https://rust-lang.github.io/rustfmt/?version=v1.5.0&search=#blank_lines_lower_bound
its example behavior is a bit wired
fn foo() {
println!("a");
}
fn bar() {
println!("b");
println!("c");
}
current version of blank_lines_lower_bound is not what we want
This comment says it's already been fixed in this https://github.com/rust-lang/rustfmt/pull/4295, just not released...
I think rust-lang/rustfmt#4295
is merged to the rustfmt-v2-rc
branch, which is not going to release.
So the current release(rustfmt-v1
) does not contain this patch.
rustfmt-v2
tracking issue:
rust-lang/rustfmt#3887
Closing since this won't be fixed with rustfmt-v1