rust-clippy/tests/ui/empty_line_after/outer_attribute.stderr

104 lines
2.9 KiB
Text
Raw Normal View History

error: empty line after outer attribute
--> tests/ui/empty_line_after/outer_attribute.rs:5:1
|
LL | / #[crate_type = "lib"]
LL | |
| |_
LL | fn first_in_crate() {}
| ------------------- the attribute applies to this function
|
= note: `-D clippy::empty-line-after-outer-attr` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::empty_line_after_outer_attr)]`
= help: if the empty line is unintentional remove it
help: if the attribute should apply to the crate use an inner attribute
|
LL | #![crate_type = "lib"]
| +
error: empty line after outer attribute
--> tests/ui/empty_line_after/outer_attribute.rs:13:1
|
LL | / #[inline]
LL | |
| |_
LL | /// some comment
LL | fn with_one_newline_and_comment() {}
| --------------------------------- the attribute applies to this function
|
= help: if the empty line is unintentional remove it
error: empty line after outer attribute
--> tests/ui/empty_line_after/outer_attribute.rs:23:1
|
LL | / #[inline]
LL | |
| |_
LL | fn with_one_newline() {}
| --------------------- the attribute applies to this function
|
= help: if the empty line is unintentional remove it
error: empty lines after outer attribute
--> tests/ui/empty_line_after/outer_attribute.rs:30:5
|
LL | / #[crate_type = "lib"]
LL | |
LL | |
| |_
LL | fn with_two_newlines() {}
| ---------------------- the attribute applies to this function
|
= help: if the empty lines are unintentional remove them
help: if the attribute should apply to the parent module use an inner attribute
|
LL | #![crate_type = "lib"]
| +
error: empty line after outer attribute
--> tests/ui/empty_line_after/outer_attribute.rs:37:1
|
LL | / #[doc = "doc attributes should be considered attributes"]
LL | |
| |_
LL | enum Baz {
| -------- the attribute applies to this enum
|
= help: if the empty line is unintentional remove it
error: empty line after outer attribute
--> tests/ui/empty_line_after/outer_attribute.rs:45:1
|
LL | / #[repr(C)]
LL | |
| |_
LL | struct Foo {
| ---------- the attribute applies to this struct
|
= help: if the empty line is unintentional remove it
error: empty line after outer attribute
--> tests/ui/empty_line_after/outer_attribute.rs:53:1
|
LL | / #[allow(dead_code)]
LL | |
| |_
LL | mod foo {}
| ------- the attribute applies to this module
|
= help: if the empty line is unintentional remove it
error: empty line after outer attribute
--> tests/ui/empty_line_after/outer_attribute.rs:58:1
|
LL | / #[inline]
LL | | // Still lint cases where the empty line does not immediately follow the attribute
LL | |
| |_
LL | fn comment_before_empty_line() {}
| ------------------------------ the attribute applies to this function
|
= help: if the empty line is unintentional remove it
error: aborting due to 8 previous errors