Skip to content

False positive: empty_line_after_outer_attr 3+ empty lines enum #2475

Closed
@alexheretic

Description

@alexheretic

Using 5e6342d empty_line_after_outer_attr warnings appear when a simple enum has 3+ empty lines. Doesn't occur with 1 or 2 empty lines.

#[derive(Clone, Copy)]
pub enum Foo {
    Bar1,

    Bar2,

    Bar3,

    Bar4,
}
warning: Found an empty line after an outer attribute. Perhaps you forgot to add a '!' to make it an inner attribute?
 --> src/main.rs:2:1
  |
2 | pub enum Foo {
  | ^
  |
  = note: #[warn(empty_line_after_outer_attr)] on by default
  = help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.186/index.html#empty_line_after_outer_attr

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thingT-macrosType: Issues with macros and macro expansion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions