Skip to content

Commit 96e3068

Browse files
committed
tests: add case for multiple semis
1 parent 41b2a3d commit 96e3068

File tree

3 files changed

+83
-47
lines changed

3 files changed

+83
-47
lines changed

tests/ui/needless_return.fixed

+10
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@ fn test_no_semicolon() -> bool {
3131
true
3232
}
3333

34+
#[rustfmt::skip]
35+
fn test_multiple_semicolon() -> bool {
36+
true
37+
}
38+
39+
#[rustfmt::skip]
40+
fn test_multiple_semicolon_with_spaces() -> bool {
41+
true
42+
}
43+
3444
fn test_if_block() -> bool {
3545
if true {
3646
true

tests/ui/needless_return.rs

+10
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@ fn test_no_semicolon() -> bool {
3131
return true;
3232
}
3333

34+
#[rustfmt::skip]
35+
fn test_multiple_semicolon() -> bool {
36+
return true;;;
37+
}
38+
39+
#[rustfmt::skip]
40+
fn test_multiple_semicolon_with_spaces() -> bool {
41+
return true;; ; ;
42+
}
43+
3444
fn test_if_block() -> bool {
3545
if true {
3646
return true;

0 commit comments

Comments
 (0)