Skip to content

unused_unit adds a space after function declarations #6230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jyn514 opened this issue Oct 26, 2020 · 1 comment · Fixed by #6247
Closed

unused_unit adds a space after function declarations #6230

jyn514 opened this issue Oct 26, 2020 · 1 comment · Fixed by #6247
Labels
C-bug Category: Clippy is not doing the correct thing L-suggestion Lint: Improving, adding or fixing lint suggestions

Comments

@jyn514
Copy link
Member

jyn514 commented Oct 26, 2020

I tried this code (https://github.com/rust-lang/stdarch/blob/598e632e8f62ff5054dfe0d0fabb2a03ecee0a3d/crates/core_arch/src/x86_64/xsave.rs#L8-L11):

extern "C" {
    fn xsave64(p: *mut u8, hi: u32, lo: u32) -> ();
}

I expected to see this happen: cargo clippy --fix converts it to fn xsave64(p: *mut u8, hi: u32, lo: u32);

Instead, this happened: --fix converts it to fn xsave64(p: *mut u8, hi: u32, lo: u32) ;

Meta

  • cargo clippy -V: clippy 0.0.212 (ffa2e7a 2020-10-24)
  • rustc -Vv:
rustc 1.49.0-nightly (ffa2e7ae8 2020-10-24)
binary: rustc
commit-hash: ffa2e7ae8fbf9badc035740db949b9dae271c29f
commit-date: 2020-10-24
host: x86_64-unknown-linux-gnu
release: 1.49.0-nightly
LLVM version: 11.0
@jyn514 jyn514 added the C-bug Category: Clippy is not doing the correct thing label Oct 26, 2020
@jyn514 jyn514 changed the title unused_unit adds whitespaces after function declarations unused_unit adds a space after function declarations Oct 26, 2020
@jyn514
Copy link
Member Author

jyn514 commented Oct 26, 2020

@rustbot modify labels: +A-suggestion

@rustbot rustbot added the L-suggestion Lint: Improving, adding or fixing lint suggestions label Oct 26, 2020
@bors bors closed this as completed in 0d2f1ae Nov 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing L-suggestion Lint: Improving, adding or fixing lint suggestions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants