Don't warn about unused parens when they are used by yeet expr
This commit is contained in:
parent
c5351ad4dc
commit
84a46352ac
4 changed files with 38 additions and 21 deletions
|
@ -617,7 +617,10 @@ trait UnusedDelimLint {
|
|||
lhs_needs_parens
|
||||
|| (followed_by_block
|
||||
&& match &inner.kind {
|
||||
ExprKind::Ret(_) | ExprKind::Break(..) | ExprKind::Yield(..) => true,
|
||||
ExprKind::Ret(_)
|
||||
| ExprKind::Break(..)
|
||||
| ExprKind::Yield(..)
|
||||
| ExprKind::Yeet(..) => true,
|
||||
ExprKind::Range(_lhs, Some(rhs), _limits) => {
|
||||
matches!(rhs.kind, ExprKind::Block(..))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue