diff options
| author | Ayaz Hafiz <ayaz.hafiz.1@gmail.com> | 2020-07-09 19:56:46 -0700 |
|---|---|---|
| committer | Caleb Cartwright <calebcartwright@users.noreply.github.com> | 2020-11-28 21:59:30 -0600 |
| commit | 3bf67c175dfa9b1bcb35f001da53b49c21e2179b (patch) | |
| tree | 87e1c9a4fa251882c7ebc7022025bb7f44185edb /tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-abort.diff | |
| parent | 5ffccbb627c35d8d9c156d236e9599c0662f35dc (diff) | |
| download | rust-3bf67c175dfa9b1bcb35f001da53b49c21e2179b.tar.gz rust-3bf67c175dfa9b1bcb35f001da53b49c21e2179b.zip | |
Don't drop blocks on foreign functions
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
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-abort.diff')
0 files changed, 0 insertions, 0 deletions
