Skip to content

Commit 0d9f566

Browse files
committed
Mention the false positive
1 parent 44f694d commit 0d9f566

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clippy_lints/src/is_unit_expr.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ fn is_unit_expr(expr: &Expr) -> Option<Span> {
134134
fn check_last_stmt_in_block(block: &Block) -> bool {
135135
let final_stmt = &block.stmts[block.stmts.len() - 1];
136136

137+
138+
//Made a choice here to risk false positives on divergent macro invocations like `panic!()`
137139
match final_stmt.node {
138140
StmtKind::Expr(_) => false,
139141
StmtKind::Semi(ref expr) => match expr.node {

0 commit comments

Comments
 (0)