Merge pull request #2577 from phansch/false_positive_empty_line_after_outer_attr_with_enum
Fix false positive in empty_line_after_outer_attribute
This commit is contained in:
commit
f7c4bb69d2
@ -267,7 +267,7 @@ fn check_attrs(cx: &LateContext, span: Span, name: &Name, attrs: &[Attribute]) {
|
||||
return;
|
||||
}
|
||||
if attr.style == AttrStyle::Outer {
|
||||
if !is_present_in_source(cx, attr.span) {
|
||||
if attr.tokens.is_empty() || !is_present_in_source(cx, attr.span) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -67,4 +67,16 @@ pub fn function() -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
// This should not produce a warning
|
||||
#[derive(Clone, Copy)]
|
||||
pub enum FooFighter {
|
||||
Bar1,
|
||||
|
||||
Bar2,
|
||||
|
||||
Bar3,
|
||||
|
||||
Bar4
|
||||
}
|
||||
|
||||
fn main() { }
|
||||
|
Loading…
Reference in New Issue
Block a user