Skip to content

unused_unit adds a space after function declarations #6230

Closed
@jyn514

Description

@jyn514

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thingL-suggestionLint: Improving, adding or fixing lint suggestions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions