Skip to content
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

Fix false positive in empty_line_after_outer_attribute #2577

Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -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() { }
ProTip! Use n and p to navigate between commits in a pull request.