Skip to content

Commit

Permalink
Fix/Issue11932: assert* in multi-condition after unrolling will cause…
Browse files Browse the repository at this point in the history
… lint emit warning
  • Loading branch information
cocodery committed Jan 3, 2024
1 parent 0153ca9 commit 090c228
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions clippy_lints/src/booleans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,8 @@ impl<'a, 'tcx> Visitor<'tcx> for NotSimplificationVisitor<'a, 'tcx> {
&& !inner.span.from_expansion()
&& let Some(suggestion) = simplify_not(self.cx, inner)
&& self.cx.tcx.lint_level_at_node(NONMINIMAL_BOOL, expr.hir_id).0 != Level::Allow
&& let Some(snippet) = snippet_opt(self.cx, expr.span)
&& !snippet.contains("assert")
{
span_lint_and_sugg(
self.cx,
Expand Down

0 comments on commit 090c228

Please sign in to comment.