6611567f9e
Also add a test case for inserting a semicolon on extern fns. Without this fix, we got an error like this: error: expected one of `->`, `where`, or `{`, found `}` --> chk.rs:3:1 | 2 | fn foo() | --- - expected one of `->`, `where`, or `{` | | | while parsing this `fn` 3 | } | ^ unexpected token Since this is inside an extern block, you're required to write function prototypes with no body. This fixes a regression, and adds a test case for it.
10 lines
99 B
Rust
10 lines
99 B
Rust
// run-rustfix
|
|
|
|
#[allow(dead_code)]
|
|
|
|
extern "C" {
|
|
fn foo() //~ERROR expected `;`
|
|
}
|
|
|
|
fn main() {}
|