Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit ee0cbea

Browse files
committed
ignore empty comment in semicolon_if_nothing_returned
1 parent 0ea4495 commit ee0cbea

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

tests/ui/semicolon_if_nothing_returned.fixed

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
//@aux-build:proc_macro_attr.rs
22

33
#![warn(clippy::semicolon_if_nothing_returned)]
4-
#![allow(clippy::redundant_closure, clippy::uninlined_format_args, clippy::needless_late_init)]
4+
#![allow(
5+
clippy::redundant_closure,
6+
clippy::uninlined_format_args,
7+
clippy::needless_late_init,
8+
clippy::empty_docs
9+
)]
510

611
#[macro_use]
712
extern crate proc_macro_attr;

tests/ui/semicolon_if_nothing_returned.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
//@aux-build:proc_macro_attr.rs
22

33
#![warn(clippy::semicolon_if_nothing_returned)]
4-
#![allow(clippy::redundant_closure, clippy::uninlined_format_args, clippy::needless_late_init)]
4+
#![allow(
5+
clippy::redundant_closure,
6+
clippy::uninlined_format_args,
7+
clippy::needless_late_init,
8+
clippy::empty_docs
9+
)]
510

611
#[macro_use]
712
extern crate proc_macro_attr;

tests/ui/semicolon_if_nothing_returned.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: consider adding a `;` to the last statement for consistent formatting
2-
--> tests/ui/semicolon_if_nothing_returned.rs:13:5
2+
--> tests/ui/semicolon_if_nothing_returned.rs:18:5
33
|
44
LL | println!("Hello")
55
| ^^^^^^^^^^^^^^^^^ help: add a `;` here: `println!("Hello");`
@@ -8,25 +8,25 @@ LL | println!("Hello")
88
= help: to override `-D warnings` add `#[allow(clippy::semicolon_if_nothing_returned)]`
99

1010
error: consider adding a `;` to the last statement for consistent formatting
11-
--> tests/ui/semicolon_if_nothing_returned.rs:17:5
11+
--> tests/ui/semicolon_if_nothing_returned.rs:22:5
1212
|
1313
LL | get_unit()
1414
| ^^^^^^^^^^ help: add a `;` here: `get_unit();`
1515

1616
error: consider adding a `;` to the last statement for consistent formatting
17-
--> tests/ui/semicolon_if_nothing_returned.rs:22:5
17+
--> tests/ui/semicolon_if_nothing_returned.rs:27:5
1818
|
1919
LL | y = x + 1
2020
| ^^^^^^^^^ help: add a `;` here: `y = x + 1;`
2121

2222
error: consider adding a `;` to the last statement for consistent formatting
23-
--> tests/ui/semicolon_if_nothing_returned.rs:28:9
23+
--> tests/ui/semicolon_if_nothing_returned.rs:33:9
2424
|
2525
LL | hello()
2626
| ^^^^^^^ help: add a `;` here: `hello();`
2727

2828
error: consider adding a `;` to the last statement for consistent formatting
29-
--> tests/ui/semicolon_if_nothing_returned.rs:39:9
29+
--> tests/ui/semicolon_if_nothing_returned.rs:44:9
3030
|
3131
LL | ptr::drop_in_place(s.as_mut_ptr())
3232
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `ptr::drop_in_place(s.as_mut_ptr());`

0 commit comments

Comments
 (0)