rust/tests/ui/empty_line_after/outer_attribute.stderr
Esteban Küber da93d78049 Add Unicode block-drawing compiler output support
Add nightly-only theming support to rustc output using Unicode box
drawing characters instead of ASCII-art to draw the terminal UI:

After:

```
error: foo
  ╭▸ test.rs:3:3
  │
3 │       X0 Y0 Z0
  │   ┌───╿──│──┘
  │  ┌│───│──┘
  │ ┏││━━━┙
  │ ┃││
4 │ ┃││   X1 Y1 Z1
5 │ ┃││   X2 Y2 Z2
  │ ┃│└────╿──│──┘ `Z` label
  │ ┃└─────│──┤
  │ ┗━━━━━━┥  `Y` is a good letter too
  │        `X` is a good letter
  ╰╴
note: bar
  ╭▸ test.rs:4:3
  │
4 │ ┏   X1 Y1 Z1
5 │ ┃   X2 Y2 Z2
6 │ ┃   X3 Y3 Z3
  │ ┗━━━━━━━━━━┛
  ├ note: bar
  ╰ note: baz
note: qux
  ╭▸ test.rs:4:3
  │
4 │   X1 Y1 Z1
  ╰╴  ━━━━━━━━
```

Before:

```
error: foo
 --> test.rs:3:3
  |
3 |       X0 Y0 Z0
  |    ___^__-__-
  |   |___|__|
  |  ||___|
  | |||
4 | |||   X1 Y1 Z1
5 | |||   X2 Y2 Z2
  | |||____^__-__- `Z` label
  | ||_____|__|
  | |______|  `Y` is a good letter too
  |        `X` is a good letter
  |
note: bar
 --> test.rs:4:3
  |
4 | /   X1 Y1 Z1
5 | |   X2 Y2 Z2
6 | |   X3 Y3 Z3
  | |__________^
  = note: bar
  = note: baz
note: qux
 --> test.rs:4:3
  |
4 |   X1 Y1 Z1
  |   ^^^^^^^^
```
2024-11-10 23:57:18 +01:00

116 lines
3.3 KiB
Text

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: empty lines after outer attribute
--> tests/ui/empty_line_after/outer_attribute.rs:64:1
|
LL | / #[allow(unused)]
LL | |
LL | | // This comment is isolated
LL | |
| |_^
LL | pub fn isolated_comment() {}
| ------------------------- the attribute applies to this function
|
= help: if the empty lines are unintentional remove them
error: aborting due to 9 previous errors