Skip to content

Commit 6e35b33

Browse files
Unknownunknown
Unknown
authored and
unknown
committed
Updating code to ignore rustfmt issue.
1 parent a35083f commit 6e35b33

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tests/ui-toml/functions_maxlines/test.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![warn(clippy::too_many_lines)]
22

3-
43
// This function should be considered one line.
54
fn many_comments_but_one_line_of_code() {
65
/* println!("This is good."); */
@@ -22,6 +21,7 @@ fn too_many_lines() {
2221
}
2322

2423
// This should be considered one line.
24+
#[rustfmt::skip]
2525
fn comment_starts_after_code() {
2626
let _ = 5; /* closing comment. */ /*
2727
this line shouldn't be counted theoretically.
@@ -34,6 +34,7 @@ fn comment_after_code() {
3434
}
3535

3636
// This should fail since it is technically two lines.
37+
#[rustfmt::skip]
3738
fn comment_before_code() {
3839
let _ = "test";
3940
/* This comment extends to the front of

tests/ui-toml/functions_maxlines/test.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: This function has a large number of lines.
2-
--> $DIR/test.rs:19:1
2+
--> $DIR/test.rs:18:1
33
|
44
LL | / fn too_many_lines() {
55
LL | | println!("This is bad.");
@@ -10,7 +10,7 @@ LL | | }
1010
= note: `-D clippy::too-many-lines` implied by `-D warnings`
1111

1212
error: This function has a large number of lines.
13-
--> $DIR/test.rs:37:1
13+
--> $DIR/test.rs:38:1
1414
|
1515
LL | / fn comment_before_code() {
1616
LL | | let _ = "test";

0 commit comments

Comments
 (0)