Extra whitespace in nested pub extern
Open
A-visibility
C-bug
I-extraneous-whitespace
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 24
Description
The following snippet formats with an extra space between pub and extern "C" if the arguments continue across multiple lines. i.e. rustfmt produces pub␣␣extern "C" instead of pub␣extern "C".
pub struct SomeCallback(
pub extern "C" fn(
long_argument_name_to_avoid_wrap: u32,
second_long_argument_name: u32,
third_long_argument_name: u32,
),
);
Checked with
- rustfmt 1.5.1-stable (4b91a6e 2022-08-08) from 1.63.0 stable
- rustfmt 1.5.1-nightly (c07a8b4 2022-08-26) from a recent nightly
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.