Skip to content

Commit c96c81f

Browse files
committed
Update tools and fulldeps tests
1 parent 9c8c863 commit c96c81f

File tree

5 files changed

+17
-11
lines changed

5 files changed

+17
-11
lines changed

Diff for: src/tools/clippy/clippy_lints/src/suspicious_operation_groupings.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ fn ident_difference_expr_with_base_location(
586586
| (ForLoop(_, _, _, _), ForLoop(_, _, _, _))
587587
| (While(_, _, _), While(_, _, _))
588588
| (If(_, _, _), If(_, _, _))
589-
| (Let(_, _, _), Let(_, _, _))
589+
| (Let(_, _, _, _), Let(_, _, _, _))
590590
| (Type(_, _), Type(_, _))
591591
| (Cast(_, _), Cast(_, _))
592592
| (Lit(_), Lit(_))

Diff for: src/tools/clippy/clippy_lints/src/unnested_or_patterns.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ impl EarlyLintPass for UnnestedOrPatterns {
6868

6969
fn check_expr(&mut self, cx: &EarlyContext<'_>, e: &ast::Expr) {
7070
if self.msrv.meets(msrvs::OR_PATTERNS) {
71-
if let ast::ExprKind::Let(pat, _, _) = &e.kind {
71+
if let ast::ExprKind::Let(pat, _, _, _) = &e.kind {
7272
lint_unnested_or_patterns(cx, pat);
7373
}
7474
}

Diff for: src/tools/clippy/clippy_utils/src/ast_utils.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ pub fn eq_expr(l: &Expr, r: &Expr) -> bool {
166166
(Unary(lo, l), Unary(ro, r)) => mem::discriminant(lo) == mem::discriminant(ro) && eq_expr(l, r),
167167
(Lit(l), Lit(r)) => l == r,
168168
(Cast(l, lt), Cast(r, rt)) | (Type(l, lt), Type(r, rt)) => eq_expr(l, r) && eq_ty(lt, rt),
169-
(Let(lp, le, _), Let(rp, re, _)) => eq_pat(lp, rp) && eq_expr(le, re),
169+
(Let(lp, le, _, _), Let(rp, re, _, _)) => eq_pat(lp, rp) && eq_expr(le, re),
170170
(If(lc, lt, le), If(rc, rt, re)) => eq_expr(lc, rc) && eq_block(lt, rt) && eq_expr_opt(le, re),
171171
(While(lc, lt, ll), While(rc, rt, rl)) => eq_label(ll, rl) && eq_expr(lc, rc) && eq_block(lt, rt),
172172
(ForLoop(lp, li, lt, ll), ForLoop(rp, ri, rt, rl)) => {

Diff for: src/tools/rustfmt/src/expr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ struct ControlFlow<'a> {
664664

665665
fn extract_pats_and_cond(expr: &ast::Expr) -> (Option<&ast::Pat>, &ast::Expr) {
666666
match expr.kind {
667-
ast::ExprKind::Let(ref pat, ref cond, _) => (Some(pat), cond),
667+
ast::ExprKind::Let(ref pat, ref cond, _, _) => (Some(pat), cond),
668668
_ => (None, expr),
669669
}
670670
}

Diff for: tests/ui-fulldeps/pprust-expr-roundtrip.rs

+13-7
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,20 @@ fn iter_exprs(depth: usize, f: &mut dyn FnMut(P<Expr>)) {
8080
let seg = PathSegment::from_ident(Ident::from_str("x"));
8181
iter_exprs(depth - 1, &mut |e| {
8282
g(ExprKind::MethodCall(Box::new(MethodCall {
83-
seg: seg.clone(), receiver: e, args: thin_vec![make_x()], span: DUMMY_SP
84-
}))
85-
)});
83+
seg: seg.clone(),
84+
receiver: e,
85+
args: thin_vec![make_x()],
86+
span: DUMMY_SP,
87+
})))
88+
});
8689
iter_exprs(depth - 1, &mut |e| {
8790
g(ExprKind::MethodCall(Box::new(MethodCall {
88-
seg: seg.clone(), receiver: make_x(), args: thin_vec![e], span: DUMMY_SP
89-
}))
90-
)});
91+
seg: seg.clone(),
92+
receiver: make_x(),
93+
args: thin_vec![e],
94+
span: DUMMY_SP,
95+
})))
96+
});
9197
}
9298
2..=7 => {
9399
let op = Spanned {
@@ -174,7 +180,7 @@ fn iter_exprs(depth: usize, f: &mut dyn FnMut(P<Expr>)) {
174180
18 => {
175181
let pat =
176182
P(Pat { id: DUMMY_NODE_ID, kind: PatKind::Wild, span: DUMMY_SP, tokens: None });
177-
iter_exprs(depth - 1, &mut |e| g(ExprKind::Let(pat.clone(), e, DUMMY_SP)))
183+
iter_exprs(depth - 1, &mut |e| g(ExprKind::Let(pat.clone(), e, DUMMY_SP, None)))
178184
}
179185
_ => panic!("bad counter value in iter_exprs"),
180186
}

0 commit comments

Comments
 (0)