Skip to content

Commit 0c8caee

Browse files
committed
Add gen blocks to ast and do some broken ast lowering
1 parent d914890 commit 0c8caee

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

clippy_lints/src/suspicious_operation_groupings.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ fn ident_difference_expr_with_base_location(
578578
| (Assign(_, _, _), Assign(_, _, _))
579579
| (TryBlock(_), TryBlock(_))
580580
| (Await(_, _), Await(_, _))
581-
| (Async(_, _), Async(_, _))
581+
| (Gen(_, _, _), Gen(_, _, _))
582582
| (Block(_, _), Block(_, _))
583583
| (Closure(_), Closure(_))
584584
| (Match(_, _), Match(_, _))

clippy_utils/src/ast_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ pub fn eq_expr(l: &Expr, r: &Expr) -> bool {
211211
&& eq_fn_decl(lf, rf)
212212
&& eq_expr(le, re)
213213
},
214-
(Async(lc, lb), Async(rc, rb)) => lc == rc && eq_block(lb, rb),
214+
(Gen(lc, lb, lk), Gen(rc, rb, rk)) => lc == rc && eq_block(lb, rb) && lk == rk,
215215
(Range(lf, lt, ll), Range(rf, rt, rl)) => ll == rl && eq_expr_opt(lf, rf) && eq_expr_opt(lt, rt),
216216
(AddrOf(lbk, lm, le), AddrOf(rbk, rm, re)) => lbk == rbk && lm == rm && eq_expr(le, re),
217217
(Path(lq, lp), Path(rq, rp)) => both(lq, rq, eq_qself) && eq_path(lp, rp),

clippy_utils/src/sugg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ impl<'a> Sugg<'a> {
190190
(snip, false) => Sugg::MaybeParen(snip),
191191
(snip, true) => Sugg::NonParen(snip),
192192
},
193-
ast::ExprKind::Async(..)
193+
ast::ExprKind::Gen(..)
194194
| ast::ExprKind::Block(..)
195195
| ast::ExprKind::Break(..)
196196
| ast::ExprKind::Call(..)

0 commit comments

Comments
 (0)