mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 03:03:40 +00:00
3bf67c175d
A code like ```rust extern "C" { fn f() { fn g() {} } } ``` is incorrect and does not compile. Today rustfmt formats this in a way that is correct: ```rust extern "C" { fn f(); } ``` But this loses information, and doesn't have to be done because we know the content of the block if it is present. During development I don't think rustfmt should drop the block in this context. Closes #4313
6 lines
52 B
Rust
6 lines
52 B
Rust
extern "C" {
|
|
fn f() {
|
|
fn g() {}
|
|
}
|
|
}
|