RS.CLIPPY.EMPTY_LINE_AFTER_OUTER_ATTR
Empty line after outer attribute
This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: empty_line_after_outer_attr. Copyright ©2025 The Rust Team. All rights reserved.
What it does
Checks for empty lines after outer attributes
Why is this bad?
The attribute may have meant to be an inner attribute (#![attr]). If
it was meant to be an outer attribute (#[attr]) then the empty line
should be removed
Example
#[allow(dead_code)]
fn not_quite_good_code() {}
Use instead:
// Good (as inner attribute)
#![allow(dead_code)]
fn this_is_fine() {}
// or
// Good (as outer attribute)
#[allow(dead_code)]
fn this_is_fine_too() {}